changing spawn teleports
This commit is contained in:
parent
f27cd8e314
commit
3a9878aebc
4 changed files with 16 additions and 3 deletions
Binary file not shown.
|
@ -23,7 +23,7 @@ public class PlayerListener implements Listener {
|
||||||
boolean timerRunning = false;
|
boolean timerRunning = false;
|
||||||
World world = Bukkit.getWorlds().get(0);
|
World world = Bukkit.getWorlds().get(0);
|
||||||
Location spawn = world.getSpawnLocation();
|
Location spawn = world.getSpawnLocation();
|
||||||
Hashtable<String, Location> playerSpawns = new Hashtable<>();
|
//Hashtable<String, Location> playerSpawns = new Hashtable<>();
|
||||||
ParseSettings parseSettings;
|
ParseSettings parseSettings;
|
||||||
boolean DEBUG;
|
boolean DEBUG;
|
||||||
|
|
||||||
|
@ -136,6 +136,8 @@ public class PlayerListener implements Listener {
|
||||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
|
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
|
||||||
if (p.getBedSpawnLocation() != null) {
|
if (p.getBedSpawnLocation() != null) {
|
||||||
p.teleport(p.getBedSpawnLocation());
|
p.teleport(p.getBedSpawnLocation());
|
||||||
|
} else {
|
||||||
|
p.teleport(spawn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
|
}.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!");
|
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + p.getDisplayName() + " has resurrected!");
|
||||||
if (p.getBedSpawnLocation() != null) {
|
if (p.getBedSpawnLocation() != null) {
|
||||||
p.teleport(p.getBedSpawnLocation());
|
p.teleport(p.getBedSpawnLocation());
|
||||||
|
} else {
|
||||||
|
p.teleport(spawn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.runTaskLater(JavaPlugin.getProvidingPlugin(Resurrection.class), timeToResurrection);
|
}.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")));
|
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.setGameMode(GameMode.SPECTATOR);
|
||||||
p.sendMessage(ChatColor.RED + "" + ChatColor.BOLD + "YOU HAVE DIED!!");
|
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'));
|
p.sendMessage(ChatColor.RED + "You will be able to respawn in the next " + timeCheck.formatTime('f'));
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
main: net.brysonsteck.Resurrection.Resurrection
|
main: net.brysonsteck.Resurrection.Resurrection
|
||||||
name: Resurrection
|
name: Resurrection
|
||||||
author: 'Bryson Steck'
|
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:
|
commands:
|
||||||
about:
|
about:
|
||||||
description: Displays information about Resurrection.
|
description: Displays information about Resurrection.
|
||||||
|
@ -11,6 +15,7 @@ commands:
|
||||||
howlong:
|
howlong:
|
||||||
description: Displays the remaining time before the player (or specified player) is resurrected.
|
description: Displays the remaining time before the player (or specified player) is resurrected.
|
||||||
usage: /howlong [PLAYER_NAME]
|
usage: /howlong [PLAYER_NAME]
|
||||||
|
aliases: [timeleft]
|
||||||
|
|
||||||
resurrect:
|
resurrect:
|
||||||
description: Manually resurrects a player.
|
description: Manually resurrects a player.
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
package net.brysonsteck.Resurrection.startup;
|
||||||
|
|
||||||
|
public class ParseLanguage {
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue