mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 11:20:32 +01:00
Add Bed Respawns back in! Thanks @Vaht
This commit is contained in:
parent
d09d340e0f
commit
ad47ce7d1b
@ -1,5 +1,7 @@
|
||||
package com.onarandombox.MultiverseCore.listeners;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
@ -59,14 +61,17 @@ public class MVPlayerListener extends PlayerListener {
|
||||
|
||||
@Override
|
||||
public void onPlayerRespawn(PlayerRespawnEvent event) {
|
||||
// TODO: Reimplement bed respawning, needs to be a way to persist the bed location or something otherwise it's not very effective.
|
||||
|
||||
World world = event.getPlayer().getWorld();
|
||||
|
||||
// If it's not a World MV manages we stop.
|
||||
if (!this.worldManager.isMVWorld(world.getName())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(event.isBedSpawn() && this.plugin.getConfig().getBoolean("bedrespawn", true)) {
|
||||
this.plugin.log(Level.FINE, "Spawning " + event.getPlayer().getName() + " at their bed");
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the MVWorld
|
||||
MVWorld mvWorld = this.worldManager.getMVWorld(world.getName());
|
||||
|
@ -30,6 +30,10 @@ disableautoheal: false
|
||||
# Players will be notified when they punch/shoot and it's not allowed.
|
||||
fakepvp: false
|
||||
|
||||
# When this is enabled, users will spawn at their last bed slept at. If the bed is destroyed or obstructed,
|
||||
# they will spawn according to your mvm respawn rules, and then whatever the server does.
|
||||
bedrespawn: true
|
||||
|
||||
# This just signifies the version number so we can see what version of config you have.
|
||||
# NEVER TOUCH THIS VALUE
|
||||
version: 2.1
|
Loading…
Reference in New Issue
Block a user