From 4bdb9603a0807c8d08f6559820440ed21c45b4cf Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Sun, 23 Oct 2016 00:13:21 -0400 Subject: [PATCH] Changed HelloWorldPlugin to ButtonHardcorePlugin --- plugin.yml | 4 ++-- src/alisolarflare/RandomTPModule.java | 6 +++--- src/iie/BoundaryListener.java | 4 ++-- ...ldPlugin.java => ButtonHardcorePlugin.java} | 2 +- src/iie/DeathListener.java | 8 ++++---- src/iie/HelloWorld.java | 8 ++++---- src/iie/JoinListener.java | 18 +++++++++--------- 7 files changed, 25 insertions(+), 25 deletions(-) rename src/iie/{HelloWorldPlugin.java => ButtonHardcorePlugin.java} (97%) diff --git a/plugin.yml b/plugin.yml index c00ee65..c46d68b 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,5 +1,5 @@ - main: iie.HelloWorldPlugin - version: 1.0.0 + main: iie.ButtonHardcorePlugin + version: 1.0.1 name: ButtonHardcorePlugin commands: hardcore: diff --git a/src/alisolarflare/RandomTPModule.java b/src/alisolarflare/RandomTPModule.java index fca4de7..b5a2306 100644 --- a/src/alisolarflare/RandomTPModule.java +++ b/src/alisolarflare/RandomTPModule.java @@ -8,7 +8,7 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.entity.Player; -import iie.HelloWorldPlugin; +import iie.ButtonHardcorePlugin; public class RandomTPModule{ private static int conflictX; @@ -19,8 +19,8 @@ public class RandomTPModule{ private static boolean eastUsed; private static boolean westUsed; @SuppressWarnings("unused") - private HelloWorldPlugin helloWorldPlugin; - public RandomTPModule(HelloWorldPlugin helloWorldPlugin) { + private ButtonHardcorePlugin helloWorldPlugin; + public RandomTPModule(ButtonHardcorePlugin helloWorldPlugin) { this.helloWorldPlugin = helloWorldPlugin; } diff --git a/src/iie/BoundaryListener.java b/src/iie/BoundaryListener.java index 31123a1..62dc117 100644 --- a/src/iie/BoundaryListener.java +++ b/src/iie/BoundaryListener.java @@ -14,8 +14,8 @@ import org.bukkit.event.player.PlayerMoveEvent; public class BoundaryListener implements Listener { - HelloWorldPlugin plugin; - public BoundaryListener(HelloWorldPlugin plugin){ + ButtonHardcorePlugin plugin; + public BoundaryListener(ButtonHardcorePlugin plugin){ this.plugin = plugin; } diff --git a/src/iie/HelloWorldPlugin.java b/src/iie/ButtonHardcorePlugin.java similarity index 97% rename from src/iie/HelloWorldPlugin.java rename to src/iie/ButtonHardcorePlugin.java index b418859..929ccea 100644 --- a/src/iie/HelloWorldPlugin.java +++ b/src/iie/ButtonHardcorePlugin.java @@ -16,7 +16,7 @@ import alisolarflare.listeners.ConflictCompassCraftingListener; import alisolarflare.listeners.DiamondArmorBlocker; -public class HelloWorldPlugin extends JavaPlugin { +public class ButtonHardcorePlugin extends JavaPlugin { public static Player iie; diff --git a/src/iie/DeathListener.java b/src/iie/DeathListener.java index ea67603..52069e7 100644 --- a/src/iie/DeathListener.java +++ b/src/iie/DeathListener.java @@ -11,8 +11,8 @@ import org.bukkit.event.entity.PlayerDeathEvent; public class DeathListener implements Listener { - HelloWorldPlugin plugin; - public DeathListener(HelloWorldPlugin plugin){ + ButtonHardcorePlugin plugin; + public DeathListener(ButtonHardcorePlugin plugin){ this.plugin = plugin; } @@ -31,8 +31,8 @@ public class DeathListener implements Listener { if (Objects.equals(worldString, "hardcore")){ - HelloWorldPlugin.hardcoreTimeDead.getScore(playername).setScore(currentTime); - HelloWorldPlugin.hardcoreInvite.getScore(playername).setScore(0); + ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername).setScore(currentTime); + ButtonHardcorePlugin.hardcoreInvite.getScore(playername).setScore(0); //player.sendMessage("death detected"); //player.sendMessage("hardcoreTimeDead score = " + String.valueOf(HelloWorldPlugin.hardcoreTimeDead.getScore(playername).getScore())); diff --git a/src/iie/HelloWorld.java b/src/iie/HelloWorld.java index 9e331cb..ab18b31 100644 --- a/src/iie/HelloWorld.java +++ b/src/iie/HelloWorld.java @@ -14,8 +14,8 @@ import org.bukkit.entity.Player; public class HelloWorld implements CommandExecutor { - HelloWorldPlugin plugin; - public HelloWorld(HelloWorldPlugin plugin){ + ButtonHardcorePlugin plugin; + public HelloWorld(ButtonHardcorePlugin plugin){ this.plugin = plugin; } @@ -41,8 +41,8 @@ public class HelloWorld implements CommandExecutor { int currentTime = (int) ((System.currentTimeMillis())/1000); int deathTime = 0; - if (HelloWorldPlugin.hardcoreTimeDead.getScore(playername) != null) //null check - if score exists - deathTime = HelloWorldPlugin.hardcoreTimeDead.getScore(playername).getScore(); //set deathTime to that score + if (ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername) != null) //null check - if score exists + deathTime = ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername).getScore(); //set deathTime to that score diff --git a/src/iie/JoinListener.java b/src/iie/JoinListener.java index b55762e..5a2cb1b 100644 --- a/src/iie/JoinListener.java +++ b/src/iie/JoinListener.java @@ -8,8 +8,8 @@ import org.bukkit.event.player.PlayerJoinEvent; public class JoinListener implements Listener { - HelloWorldPlugin plugin; - public JoinListener(HelloWorldPlugin plugin){ + ButtonHardcorePlugin plugin; + public JoinListener(ButtonHardcorePlugin plugin){ this.plugin = plugin; } @@ -21,22 +21,22 @@ public class JoinListener implements Listener { String playername = (String) player.getName(); - if (HelloWorldPlugin.hardcoreInvite.getScore(playername) == null){ //null check - HelloWorldPlugin.hardcoreInvite.getScore(playername).setScore(0); //convert null to 0 + if (ButtonHardcorePlugin.hardcoreInvite.getScore(playername) == null){ //null check + ButtonHardcorePlugin.hardcoreInvite.getScore(playername).setScore(0); //convert null to 0 } - if (HelloWorldPlugin.hardcoreTimeDead.getScore(playername) == null){ //null check - HelloWorldPlugin.hardcoreTimeDead.getScore(playername).setScore(0); //convert null to 0 + if (ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername) == null){ //null check + ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername).setScore(0); //convert null to 0 } - int invite = HelloWorldPlugin.hardcoreInvite.getScore(playername).getScore(); - int deathTime = HelloWorldPlugin.hardcoreTimeDead.getScore(playername).getScore(); + int invite = ButtonHardcorePlugin.hardcoreInvite.getScore(playername).getScore(); + int deathTime = ButtonHardcorePlugin.hardcoreTimeDead.getScore(playername).getScore(); int currentTime = (int) ((System.currentTimeMillis())/1000); if (currentTime - deathTime >= 86400 && deathTime != 0 && invite == 0){ player.sendMessage(playername + ", your death has lifted in Hardcore world. (You died " + String.valueOf((currentTime - deathTime) /3600) + " hours ago)"); player.sendMessage("Are you ready to give life another shot?"); - HelloWorldPlugin.hardcoreInvite.getScore(playername).setScore(1); + ButtonHardcorePlugin.hardcoreInvite.getScore(playername).setScore(1); }else if (currentTime - deathTime <= 86400){ player.sendMessage(String.valueOf((86400 - (currentTime - deathTime)) /3600) + " hours of death remaining in hardcore"); }else if (deathTime == 0){