generated from TobiasDeBruijn/BaseBukkitPlugin
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added /getcode - Storage works now - Organization of the classes - Updated plugin.yml - Added /skinfixer - Added PlayerJoinEventListener
- Loading branch information
TheDutchMC
committed
Aug 12, 2020
1 parent
ec50352
commit 60d4819
Showing
16 changed files
with
372 additions
and
95 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
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
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
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
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
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/nl/thedutchmc/SkinFixer/commandHandlers/GetCodeCommandExecutor.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 nl.thedutchmc.SkinFixer.commandHandlers; | ||
|
||
import org.bukkit.command.Command; | ||
import org.bukkit.command.CommandExecutor; | ||
import org.bukkit.command.CommandSender; | ||
import org.bukkit.entity.Player; | ||
|
||
import net.md_5.bungee.api.ChatColor; | ||
import nl.thedutchmc.SkinFixer.commonEventMethods.AddNewSkin; | ||
|
||
public class GetCodeCommandExecutor implements CommandExecutor { | ||
|
||
@Override | ||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { | ||
|
||
if(!(sender instanceof Player)) { | ||
sender.sendMessage(ChatColor.RED + "This command is for players only!"); | ||
return true; | ||
} | ||
|
||
if(!sender.hasPermission("skinfixer.getcode") ) { | ||
sender.sendMessage(ChatColor.RED + "You don't have permission to use this command!"); | ||
return true; | ||
} | ||
|
||
if(args.length == 0) { | ||
sender.sendMessage(ChatColor.RED + "You need to provide a URL to your skin!"); | ||
return true; | ||
} | ||
|
||
int code = AddNewSkin.add(args[0]); | ||
sender.sendMessage(ChatColor.GOLD + "Your skin has been added! You can apply it with /setskin " + code); | ||
|
||
return true; | ||
} | ||
} |
Oops, something went wrong.