Skip to content

Commit

Permalink
Forgotten Ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
Ftsos committed Aug 18, 2021
1 parent 8843427 commit 4b92e94
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@ EnderButt
Permissions
-----------

* **EnderButt Command**: enderbutt.command

* **EnderButt Command**: `enderbutt.command`
* **EnderButt Reload Command**: `enderbutt.reload`


Commands
--------

* **/enderbutt**: gives you a stack of Ender Butts


* **/enderbuttreload**: reloads the config of this plugin

Config
------
Expand All @@ -44,8 +43,16 @@ volumeSound: 100
`pitchSound`: The Pitch of the Sound that is going to play

`volumeSound`: The Voulume of the Sound that is going to play


Support
--------

The Support Is **JUST** going to be given in the Issues Tab Of The GitHub Page or Discord Contact

---
## [**Spigot Page**](https://www.spigotmc.org/resources/ender-butt.95453/)
- - -

*Sorry for english gramatical errors, i'm actually learing it ;).*

> _Discord Tag: **F_tsos#4081**_
2 changes: 2 additions & 0 deletions src/main/java/me/ftsos/enderbutt/enderbutt/Enderbutt.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.ftsos.enderbutt.enderbutt;

import me.ftsos.enderbutt.enderbutt.commands.EnderButtCommand;
import me.ftsos.enderbutt.enderbutt.commands.EnderButtReloadCommand;
import me.ftsos.enderbutt.enderbutt.listeners.EnderPearlClick;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
Expand All @@ -26,6 +27,7 @@ public void registerEvents(){
}
public void registerCommands(){
this.getCommand("enderbutt").setExecutor(new EnderButtCommand(this));
this.getCommand("enderbuttreload").setExecutor(new EnderButtReloadCommand(this));
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package me.ftsos.enderbutt.enderbutt.commands;

import me.ftsos.enderbutt.enderbutt.Enderbutt;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;

public class EnderButtReloadCommand implements CommandExecutor {
private Enderbutt plugin;

public EnderButtReloadCommand(Enderbutt plugin) {
this.plugin = plugin;
}

@Override
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
if(sender.hasPermission("enderbutt.reload")){
plugin.reloadConfig();
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&aReloaded"));
return true;
} else {

if(plugin.getConfig().contains("nopermissions")) {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString("nopermissions")));
} else {
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', "&cYou don't have permission"));

}
return false;

}
}
}
4 changes: 3 additions & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ authors: [ ftsos ]
description: EnderButt :D
commands:
enderbutt:
description: gives you an ender butt
description: gives you an ender butt
enderbuttreload:
description: reloads config of the enderbutt plugin

0 comments on commit 4b92e94

Please sign in to comment.