-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
deec5b0
commit 328c75b
Showing
3 changed files
with
40 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/henry232323/killstreaks/KillstreakCommandExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package henry232323.killstreaks; | ||
|
||
import org.bukkit.ChatColor; | ||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
|
||
public class KillstreakCommandExecutor implements CommandExecutor { | ||
Killstreaks plugin; | ||
|
||
KillstreakCommandExecutor(Killstreaks plugin) { | ||
this.plugin = plugin; | ||
} | ||
|
||
|
||
@Override | ||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | ||
try { | ||
if (args.length != 1) { | ||
String version = plugin.getDescription().getVersion(); | ||
sender.sendMessage(ChatColor.GOLD + "Killstreaks Version " + version); | ||
return true; | ||
} | ||
if (args[0].equalsIgnoreCase("reload")) { | ||
plugin.initConfig(); | ||
sender.sendMessage(ChatColor.GOLD + "Killstreaks reloaded"); | ||
return true; | ||
} | ||
|
||
return false; | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters