diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/commands/modelcommands.java b/src/main/java/me/jakedadream/ParadisuPlugin/commands/modelcommands.java deleted file mode 100644 index f40cb94..0000000 --- a/src/main/java/me/jakedadream/ParadisuPlugin/commands/modelcommands.java +++ /dev/null @@ -1,78 +0,0 @@ -package me.jakedadream.ParadisuPlugin.commands; - -import org.bukkit.ChatColor; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.entity.Player; - -public class modelcommands implements CommandExecutor { - - private String getParsedName(String[] args) { - String name = ""; - for (int i = 0; i < args.length; i++) { - name = name.concat(args[i]); - name = name.concat(" "); - } - return ChatColor.translateAlternateColorCodes('&', name); - } - - - - @Override - public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { - if (!(sender instanceof Player)) { - sender.sendMessage(ChatColor.RED + "Only players can use that command!"); - return true; - } - Player player = (Player) sender; - - switch (cmd.getName().toLowerCase()) { - - case "mgive": - if (player.hasPermission("snw.model")) { - - // model menu - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Default Models!"); - } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } - return true; - - - case "hgive": - if (player.hasPermission("snw.model")) { - - // hat menu - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Hat Models!"); - } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } - return true; - - - case "mhat": - if (player.hasPermission("snw.model")) { - - // model on head - - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fPlaced the model on your head!"); - } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } - return true; - - - case "createmodelcfsection": - if (player.hasPermission("snw.model")) { - - // create new default model section in config file - - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fNew Model Section created!"); - } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } - return true; - - - - - default: - return false; - } - } -} - - diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java b/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java index 97ca9d8..60cabc5 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java @@ -96,114 +96,6 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String } return true; - case "idlist": - if (player.hasPermission("snw.models")) { - player.sendMessage("" + - "§7| §c§lMODEL ID LIST\n" + - "§7|---------------------\n" + - "§7| §aWarp Pipe, §6§l//1\n" + - "§7| §a1/2 Warp Pipe, §6§l//2\n" + - "§7| §7Spawn Lights, §6§l//3\n" + - "§7| §cRed §fLollipop, §6§l//4\n" + - "§7| §cPirahna §aPlant §fUrinal, §6§l//5\n" + - "§7| §eStar §cPost, §6§l//6\n" + - "§7| §4Ribbon, §6§l//7\n" + - "§7| §dPeach's Castle §bStained Glass Window, §6§l//8\n" + - "§7| §f§lNint Sign, §6§l//9\n" + - "§7| §f§lSuper Sign, §6§l//10\n" + - "§7| §f§lEndo Sign, §6§l//11\n" + - "§7| §f§lWorld Sign, §6§l//12\n" + - "§7| §f§lJake's §7§lLong §8§lSword, §6§l//13\n" + - "§7| §e§lQuestion Block, §6§l//14\n" + - "§7| §bPeach's Castle §eWindow, §6§l//15\n" + - "§7| §6Pirahana Plant Spike, §6§l//16\n" + - "§7| §6(NOT CURRENCY) §eGold Coin Prop, §6§l//17\n" + - "§7| §e§lQUESTION MARK COIN, §6§l//18\n" + - "§7| §3§lSNW Light Post #1 (Bottom Half), §6§l//19\n" + - "§7| §3§lSNW Light Post #1 (Top Half), §6§l//20\n" + - "§7| §4Piranha Plant Main (Aero), §6§l//21\n" + - "§7| §4Piranha Plant Jaw (Aero), §6§l//22\n" + - "§7| §aGreen §2Shell, §6§l//23\n" + - "§7| §716 Bit §c§lMario §9§lCap, §6§l//24\n" + - "§7| §3[§cBuilder§3] §e§lHard Hat, §6§l//25\n" + - "§7| §716 Bit §a§lLuigi §9§lCap, §6§l//26\n" + - "§7| §dPeach's §eCrown, §6§l//27\n" + - "§7| §3Sailor §bMoons §ehair, §6§l//28\n" + - "§7| §7§lShark §f§lCap, §6§l//29\n" + - "§7| §3Jaws Boat §fFront, §6§l//30\n" + - "§7| §3Jaws Boat §fBack, §6§l//31\n" + - "§7| §c§lMushroom §f§lTable §7(Medium), §6§l//32\n" + - "§7| §c§lMushroom §f§lTable §7(Small), §6§l//33\n" + - "§7| §c§lMushroom §f§lTable §7(Large), §6§l//34\n" + - "§7| §f§lClouds §f☻, §6§l//35\n" + - "§7| §7§lBullet §7Bill, §6§l//36\n" + - "§7| §a3 Way Warp Pipe, §6§l//37\n" + - "§7| §cMario §eFlag, §6§l//38\n" + - "§7| §cF§6i§er§ce §6F§el§co§6w§ee§cr, §6§l//39\n" + - "§7| §6§lKey §e§lCoin, §6§l//40\n" + - "§7| §eGoodbye §b20§f20 §eGlasses, §6§l//41\n" + - "§7| §7§lDarksaber, §6§l//42\n" + - "§7| §6§lPOW! §4§lBlock, §6§l//43\n" + - "§7| §b§lPOW! §3§lBlock, §6§l//44\n" + - "§7| §7§lJaws §f§lDisplay Shark, §6§l//45\n" + - "§7| §7§lBROKEN MODEL, §6§l//46\n" + - "§7| §fFull White Fence, §6§l//47\n" + - "§7| §fHalf White Fence, §6§l//48\n" + - "§7| §7§lBullet §7Bill Cannon, §6§l//49\n" + - "§7| §c§lMario §9§lWristband, §6§l//50\n" + - "§7| §a§lLuigi §9§lWristband, §6§l//51\n" + - "§7| §a§lYoshi's §f§lEgg, §6§l//52\n" + - "§7| §a§lYoshi, §6§l//53\n" + - "§7| §7§lThwomp!, §6§l//54\n" + - "§7| §c§lMario's §9§lCap §fStrawberry Shortcake sandwich, §6§l//55\n" + - "§7| §a§lLuigi's §9§lCap §fNo-Bake Cheesecake sandwhich, §6§l//56\n" + - "§7| §c§lMario's §f§lStrawberry Soda, §6§l//57\n" + - "§7| §a§lLuigi's §f§lGreen Apple Soda, §6§l//58\n" + - "§7| §e§lPrincess Peach's §f§lPeach Soda, §6§l//59\n" + - "§7| §fZero §4Twos §cHeadband, §6§l//60\n" + - "§7| §aPalutena's §6Magic §3Staff, §6§l//61\n" + - "§7| §7ODM §2Gear, §6§l//62\n" + - "§7| §7ODM §2Gear §7Blade, §6§l//63\n" + - "§7| §eElizabeth §fthe §5§lGoomba, §6§l//64\n" + - "§7| §eBrad §fthe §c§lGoomba, §6§l//65\n" + - "§7| §eHissy §fthe §2§lGoomba, §6§l//66\n" + - "§7| §cPirahna §aPlant §fJaw, §6§l//67\n" + - "§7| §cPirahna §aPlant §fStem, §6§l//68\n" + - "§7| §cPirahna §aPlant §fMouth, §6§l//69\n" + - "§7| §fTex's §dSimp §6Compass, §6§l//70\n" + - "§7| §fSalty's §dSimp §6Compass, §6§l//71\n" + - "§7| §fUnconfirmable's §dSimp §6Compass, §6§l//72\n" + - "§7| §fEboy's §dSimp §6Compass, §6§l//73\n" + - "§7| §fJake's §dSimp §6Compass, §6§l//74\n" + - "§7| §4§lShy §f§lGuy §6§l//75\n" + - "§7| §4§lWanda's Headband §6§l//76\n" + - "§7| §0§lMais §8§lBunny Ears §6§l//77\n" + - "§7| §6§lLlama Hat §6§l//78\n" + - "§7| §b§lLight Blue §fYoshi Ride Cart §6§l//79\n" + - "§7| §a§lLight Green §fYoshi Ride Cart §6§l//80\n" + - "§7| §5§lPurple §fYoshi Ride Cart §6§l//81\n" + - "§7| §6§lOrange §fYoshi Ride Cart §6§l//82\n" + - "§7| §c§lRed §fYoshi Ride Cart §6§l//83\n" + - "§7| §d§lPink §fYoshi Ride Cart §6§l//84\n" + - "§7| §3§lBlue §fYoshi Ride Cart §6§l//85\n" + - "§7| §e§lYellow §fYoshi Ride Cart §6§l//86\n" + - "§7| §fYoshi Ride Cart §cBars §6§l//87\n" + - "§7| §8§lBowser's Castle §7Recycle Can §6§l//88\n" + - "§7| §8§lBowser's Castle §7Trash Can §6§l//89\n" + - "§7| §3§lSuper Nintendo World §fRecycle Can §6§l//90\n" + - "§7| §3§lSuper Nintendo World §fTrash Can §6§l//91\n" + - "§7| §a§lYoshi §fMerchandise §aKart §6§l//92\n" + - "§7| §3§lWater§9§lWorld §f§lSpinner §6§l//93\n" + - "§7| §3§lAmity §c§lIsland §6§lSign §6§l//94\n" + - "§7| §c§Mav's Surfboard §6§l//95\n" + - "§7| §4§lJurassic §e§lWorld §8§lHat §6§l//96\n" + - "§7| §6§lSpace §f§lShuttle §6§l//97"); - } else { - player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); - } - return true; - - case "sc": if (player.hasPermission("snw.sc")) { if (args.length == 0) { @@ -323,7 +215,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String try { Inventory targetinv = target.getInventory(); player.openInventory(targetinv); - player.sendMessage("§3[§dParadisu §bツ§3] §fNow opening the inventory of §3" + target + ""); + player.sendMessage("§3[§dParadisu §bツ§3] §fNow opening the inventory of §3" + target.getName() + ""); } catch (NullPointerException e) { player.sendMessage("§3[§dParadisu §bツ§3] §fThis player does not exist or is offline."); } @@ -706,6 +598,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String player.sendMessage(" §3[§dParadisu §bツ§3] Plugin"); player.sendMessage("§c===================================="); player.sendMessage("§dPlugin Coded by §3Jakey §d- §3Jakey#9999"); + player.sendMessage("§dPlugin Coded by §3Cyto §d- §3cyto ツ#7288"); player.sendMessage(""); player.sendMessage("§b§oWith help from:"); player.sendMessage("§3RealInstantRamen §c- §f§oTrashcans & Model ID system"); diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelcommands.java b/src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelcommands.java index 138fadf..5418763 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelcommands.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/modelmanager/modelcommands.java @@ -1,6 +1,7 @@ package me.jakedadream.ParadisuPlugin.modelmanager; import me.jakedadream.ParadisuPlugin.paradisumain; +import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; @@ -39,6 +40,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String if (player.hasPermission("snw.model")) { if(args.length == 0){ player.openInventory(PropModelInv.getInvs().get(0)); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Default Models!"); } else if (args.length == 1){ PlayerInventory inv = player.getInventory(); int firstEmpty = inv.firstEmpty(); @@ -47,8 +49,18 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String return false; } player.getInventory().addItem(modelitemmanager.createPropModel(Integer.parseInt(args[0]))); - } - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Default Models!"); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fWe gave you the model §3#" + args[0] + "§f!"); + } else if (args.length == 2) { + Player target = Bukkit.getPlayerExact(args[1]); + PlayerInventory inv = target.getInventory(); + int firstEmpty = inv.firstEmpty(); + if (firstEmpty == -1){ + player.sendMessage("§3[§dParadisu §bツ§3] §7They do not have space their your inventory."); + return false; + } + target.getInventory().addItem(modelitemmanager.createPropModel(Integer.parseInt(args[0]))); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fWe gave them the model §3#" + args[0] + "§f!"); + } else { player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §7Not Enough or too many args");} } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } return true; @@ -58,6 +70,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String if (args.length == 0) { player.openInventory(HatModelInv.getInvs().get(0)); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Hat Models!"); } else if (args.length == 1){ PlayerInventory inv = player.getInventory(); int firstEmpty = inv.firstEmpty(); @@ -66,8 +79,19 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String return false; } player.getInventory().addItem(modelitemmanager.createHatModel(Integer.parseInt(args[0]))); - } - player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fOpening the Catalog of Hat Models!"); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fWe gave you the model §3#" + args[0] + "§f!"); + } else if (args.length == 2) { + Player target = Bukkit.getPlayerExact(args[1]); + PlayerInventory inv = target.getInventory(); + int firstEmpty = inv.firstEmpty(); + if (firstEmpty == -1){ + player.sendMessage("§3[§dParadisu §bツ§3] §7They do not have space their your inventory."); + return false; + } + target.getInventory().addItem(modelitemmanager.createHatModel(Integer.parseInt(args[0]))); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fWe gave them the model §3#" + args[0] + "§f!"); + + } else { player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §7Not Enough or too many args");} } else { player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } return true; @@ -88,7 +112,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String } paradisumain.reloadPropModelsConfig(); PropModelInv.createInvs(); - player.sendMessage("ok"); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fReloaded Props"); break; case "reloadhats": @@ -98,7 +122,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String } paradisumain.reloadHatModelsConfig(); HatModelInv.createInvs(); - player.sendMessage("ok"); + player.sendMessage("§3[§dParadisu §f§lMODELS §bツ§3] §fReloaded Hats"); break; case "createmodelcfsection": diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java b/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java index ca736b8..a24ed70 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java @@ -32,18 +32,14 @@ public static void main(String[] args) { |_____/ \__,_| .__/ \___|_| |_| \_|_|_| |_|\__\___|_| |_|\__,_|\___/ \/ \/ \___/|_| |_|\__,_| | | |_| -. . . . . . . .---. . - \ \ / / o _|__|_ | | | - \ \ /.--.. | | .-. .--. |.-. . . | .-. |.-. .-. . . - \/ \/ | | | | (.-' | | | )| | ;( ) |-.'(.-' | | - ' ' ' -' `-`-'`-'`--'' `- '`-' `--| `--' `-'`-' `-`--'`--| - ; ; & cyto - `-' `-' + __ __ __ ___ ______ __ + / /_ __ __ / /___ _/ /_____ ( _ ) / ____/_ __/ /_____ + / __ \/ / / / __ / / __ `/ //_/ _ \ / __ \/| / / / / / / __/ __ \ + / /_/ / /_/ / / /_/ / /_/ / ,< / __/ / /_/ < / /___/ /_/ / /_/ /_/ / + /_.___/\__, / \____/\__,_/_/|_|\___/ \____/\/ \____/\__, /\__/\____/ + /____/ /____/ - With help from RealInstantRamen, Andyinnie, & Kastle yelling in my ear. -*/ - - int sched; + */ @Override public void onEnable() { @@ -140,7 +136,10 @@ public void onEnable() { getServer().getPluginManager().registerEvents(new chatevents(), this); getServer().getPluginManager().registerEvents(new snwevents(), this); getServer().getPluginManager().registerEvents(new GuiListeners(), this); - getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "[Paradisu] Plugin is now enabled"); + getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "\n" + ChatColor.GREEN + + "|------------------------------|\n" + ChatColor.GREEN + + "| [Paradisu] Plugin now Active |\n" + ChatColor.GREEN + + "|------------------------------|"); // //