aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2021-11-29 13:09:40 -0700
committerBryson Steck <steck.bryson@gmail.com>2021-11-29 13:09:40 -0700
commit3a9878aebc60f3c4211efb92993d0acdb792f108 (patch)
tree6879ced4df305d49ef46ac96e1f7b7672e03c3c0 /src
parentf27cd8e3149a77bd05c0bbd4ca77b1e561c45528 (diff)
downloadresurrection-3a9878aebc60f3c4211efb92993d0acdb792f108.tar
resurrection-3a9878aebc60f3c4211efb92993d0acdb792f108.tar.gz
resurrection-3a9878aebc60f3c4211efb92993d0acdb792f108.tar.bz2
changing spawn teleports
Diffstat (limited to 'src')
-rw-r--r--src/net/brysonsteck/Resurrection/player/PlayerListener.java8
-rw-r--r--src/net/brysonsteck/Resurrection/plugin.yml7
-rw-r--r--src/net/brysonsteck/Resurrection/startup/ParseLanguage.java4
3 files changed, 16 insertions, 3 deletions
diff --git a/src/net/brysonsteck/Resurrection/player/PlayerListener.java b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
index 539e328..b33a32d 100644
--- a/src/net/brysonsteck/Resurrection/player/PlayerListener.java
+++ b/src/net/brysonsteck/Resurrection/player/PlayerListener.java
@@ -23,7 +23,7 @@ public class PlayerListener implements Listener {
boolean timerRunning = false;
World world = Bukkit.getWorlds().get(0);
Location spawn = world.getSpawnLocation();
- Hashtable<String, Location> playerSpawns = new Hashtable<>();
+ //Hashtable<String, Location> playerSpawns = new Hashtable<>();
ParseSettings parseSettings;
boolean DEBUG;
@@ -136,6 +136,8 @@ public class PlayerListener implements Listener {
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
if (p.getBedSpawnLocation() != null) {
p.teleport(p.getBedSpawnLocation());
+ } else {
+ p.teleport(spawn);
}
}
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
@@ -225,6 +227,8 @@ public class PlayerListener implements Listener {
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
if (p.getBedSpawnLocation() != null) {
p.teleport(p.getBedSpawnLocation());
+ } else {
+ p.teleport(spawn);
}
}
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
@@ -243,7 +247,7 @@ public class PlayerListener implements Listener {
}
TimeCheck timeCheck = new TimeCheck(Long.parseLong(parseSettings.getSetting("resurrection_time")));
- playerSpawns.put(p.getDisplayName(), p.getLocation());
+ //playerSpawns.put(p.getDisplayName(), p.getLocation());
p.setGameMode(GameMode.SPECTATOR);
p.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "YOU HAVE DIED!!");
p.sendMessage(ChatColor.RED + "You will be able to respawn in the next " + timeCheck.formatTime('f'));
diff --git a/src/net/brysonsteck/Resurrection/plugin.yml b/src/net/brysonsteck/Resurrection/plugin.yml
index b75407d..b436e22 100644
--- a/src/net/brysonsteck/Resurrection/plugin.yml
+++ b/src/net/brysonsteck/Resurrection/plugin.yml
@@ -1,7 +1,11 @@
main: net.brysonsteck.Resurrection.Resurrection
name: Resurrection
author: 'Bryson Steck'
-version: '1.1'
+version: '1.1.1'
+website: https://brysonsteck.net/resurrection.html
+description: Makes players wait large amounts of time before respawning!
+database: false
+
commands:
about:
description: Displays information about Resurrection.
@@ -11,6 +15,7 @@ commands:
howlong:
description: Displays the remaining time before the player (or specified player) is resurrected.
usage: /howlong [PLAYER_NAME]
+ aliases: [timeleft]
resurrect:
description: Manually resurrects a player.
diff --git a/src/net/brysonsteck/Resurrection/startup/ParseLanguage.java b/src/net/brysonsteck/Resurrection/startup/ParseLanguage.java
new file mode 100644
index 0000000..a156aae
--- /dev/null
+++ b/src/net/brysonsteck/Resurrection/startup/ParseLanguage.java
@@ -0,0 +1,4 @@
+package net.brysonsteck.Resurrection.startup;
+
+public class ParseLanguage {
+}