Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ public class PlayerDeath implements Listener {
public void onPlayerDeath(PlayerRespawnEvent ev) {
final Player p = ev.getPlayer();
if (p.hasPermission("multispawn.noteleportondeath") // If player is excluded
|| plugin.getSpawnUtils().getSpawns(p, false).isEmpty()) return; // If spawns are empty
|| !plugin.getConfig().getBoolean("teleportOnDeath") // If disabled in config.yml
|| plugin.getSpawnUtils().getSpawns(p, false).isEmpty()) return; // If spawns are empty

if (plugin.getSpawnUtils().getSpawns(p, true).size() == 1
&& plugin.getSpawnUtils().getSpawns(p, true).contains("default")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class PlayerJoin implements Listener {
public void onPlayerJoin(PlayerJoinEvent ev) {
final Player p = ev.getPlayer();
if (p.hasPermission("multispawn.noteleport") // If player is excluded
|| !plugin.getConfig().getBoolean("teleportOnJoin") // If disabled in config.yml
|| plugin.getSpawnUtils().getSpawns(p, false).isEmpty()) return; // If spawns are empty

if (plugin.getSpawnUtils().getSpawns(p, true).size() == 1
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
spawns: []
useDefaultAsFallback: true # If the player has no permissions, use the spawn named 'default'
configversion: 1

teleportOnJoin: true
teleportOnDeath: false