From 9d1bcd42a438c1568d98485866baa0357ea0750f Mon Sep 17 00:00:00 2001 From: Jacob S Date: Wed, 21 Jul 2021 13:22:16 -0700 Subject: [PATCH] testing github webhook --- .../ParadisuPlugin/commands/snwcommands.java | 35 ++++++++++++++----- .../ParadisuPlugin/events/toys.java | 6 +++- .../ParadisuPlugin/paradisumain.java | 1 + src/main/resources/plugin.yml | 7 ++-- 4 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java b/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java index 23964e1..567f327 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/commands/snwcommands.java @@ -338,7 +338,7 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String case "sex": if (player.hasPermission("snw.sex")) { player.sendMessage("§3[§dParadisu §bツ§3] §fYou are now having sex!!!!!"); - } + } else { player.sendMessage("Unknown command. Tyle \"/help\" for help."); } return true; case "tphere": @@ -734,15 +734,18 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String unknown.add(all.getName()); } - player.sendMessage("§3§l============ §d§oOnline Players §3§l============\n" + - " \n" + - "§3\uE006 §d»§f " + owners + "\n" + - "§e\uE002 §d»§f " + devs + "\n" + - "§c\uE001 §d»§f " + builders + "\n" + - "§a\uE005 §d»§f " + staff + "\n" + - "§d\uE008 §d»§f " + supporters + "\n" + - "§7\uE00A §d»§f " + visitors + "\n" ); + + String result = String.join(" ", owners); } + player.sendMessage("§3§l============= §f" + onlineammount + " §d§oOnline Players §3§l=============\n" + + " \n" + + "§3\uE006 §d»§f " + owners + "\n" + + "§e\uE002 §d»§f " + devs + "\n" + + "§c\uE001 §d»§f " + builders + "\n" + + "§a\uE005 §d»§f " + staff + "\n" + + "§d\uE008 §d»§f " + supporters + "\n" + + "§7\uE00A §d»§f " + visitors + "\n" ); + } else {player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } return true; @@ -768,6 +771,20 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String } else {player.sendMessage("§3[§dParadisu §bツ§3] §7You do not have permission to use that command."); } return true; + case "currenttime": + if (player.hasPermission("snw.currenttime")) { + String ampm = null; + Long ct = player.getWorld().getTime(); + if (ct<1200) { + ampm = "AM"; + } else { ampm = "PM";} + + player.sendMessage("It is currently " + ct + " " + ampm); + + + } 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/events/toys.java b/src/main/java/me/jakedadream/ParadisuPlugin/events/toys.java index 4d9c57d..3eeb8a5 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/events/toys.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/events/toys.java @@ -10,6 +10,8 @@ import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.inventory.ItemStack; +import java.util.Random; + public class toys implements Listener { @EventHandler @@ -32,7 +34,9 @@ public void dslauncher(final PlayerInteractEvent e) { s.setItem(item); - p.getWorld().playSound(p.getLocation(), Sound.ENTITY_PIGLIN_JEALOUS, 1F, 1F); + Random rd = new Random(); + Float rpitch = rd.nextFloat(); + p.getWorld().playSound(p.getLocation(), Sound.BLOCK_RESPAWN_ANCHOR_DEPLETE, 1F, rpitch); } } } diff --git a/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java b/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java index 526fa02..4ed123d 100644 --- a/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java +++ b/src/main/java/me/jakedadream/ParadisuPlugin/paradisumain.java @@ -80,6 +80,7 @@ public void onEnable() { getCommand("tempcmd").setExecutor(new snwcommands()); getCommand("list").setExecutor(new snwcommands()); getCommand("findplayercords").setExecutor(new snwcommands()); + getCommand("currenttime").setExecutor(new snwcommands()); // // // getCommand("XYZ").setExecutor(new generalcommands()); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 1947e07..e6a182e 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: ParadisuPlugin -version: 2.3.0 +version: 2.3.1 authors: [JakeDaDream, RealInstantRamen, andyinnie, _Kastle] main: me.jakedadream.ParadisuPlugin.paradisumain api-version: 1.16 @@ -160,4 +160,7 @@ commands: usage: / aliases: - fpc - - findpc \ No newline at end of file + - findpc + currenttime: + description: tells you da time + usage: / \ No newline at end of file