diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-07-21 21:54:56 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-07-21 21:54:56 -0600 |
commit | 783273fadd17aa89eda921f2ab8e223506140a44 (patch) | |
tree | 8a8be0dcc6397c58dfd12a1ee98357ec44d3cbc9 | |
parent | 4f0ac642fa3fdbd8ba4237013134f68af72f42a0 (diff) | |
download | resurrection-783273fadd17aa89eda921f2ab8e223506140a44.tar resurrection-783273fadd17aa89eda921f2ab8e223506140a44.tar.gz resurrection-783273fadd17aa89eda921f2ab8e223506140a44.tar.bz2 |
removed constructer, spawn works
-rw-r--r-- | out/artifacts/Resurrection_jar/Resurrection.jar | bin | 1352906 -> 1352592 bytes | |||
-rw-r--r-- | src/net/brysonsteck/Resurrection/player/PlayerListener.java | 19 |
2 files changed, 1 insertions, 18 deletions
diff --git a/out/artifacts/Resurrection_jar/Resurrection.jar b/out/artifacts/Resurrection_jar/Resurrection.jar Binary files differindex 690e82e..772ecf0 100644 --- a/out/artifacts/Resurrection_jar/Resurrection.jar +++ b/out/artifacts/Resurrection_jar/Resurrection.jar diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java index d638347..749d6b6 100644 --- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java +++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java @@ -25,22 +25,6 @@ public class PlayerListener implements Listener { Location spawn = world.getSpawnLocation(); Hashtable<String, Location> playerSpawns = new Hashtable<>(); - public PlayerListener() { - double newY = 46; - while(true) { - Location testLocation = new Location (world, 0, newY, 0); - Block block = testLocation.getBlock(); - if (block.getType() == Material.AIR) { - newY++; - System.out.println("The spawn block at X0 Z0 is Y" + newY); -// spawn = testLocation; - break; - } else { - newY++; - } - } - } - @EventHandler public void onJoin(PlayerJoinEvent e) { Player p = e.getPlayer(); @@ -90,7 +74,7 @@ public class PlayerListener implements Listener { PotionEffect slowness = new PotionEffect(PotionEffectType.SLOW, 999999999, 10, false); blindness.apply(p); slowness.apply(p); - // convert to seconds and to ticks + p.teleport(spawn); } }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1); resurrectTime = resurrectTime - System.currentTimeMillis(); @@ -211,7 +195,6 @@ public class PlayerListener implements Listener { // invisibility.apply(p); blindness.apply(p); slowness.apply(p); - p.teleport(spawn); } }.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), 1); } |