mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2025-02-16 12:31:59 +01:00
Hopefully Fixed an NPE...
This commit is contained in:
parent
4053937019
commit
130c51c366
@ -62,7 +62,7 @@ public class MVEntityListener extends EntityListener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (defender instanceof Player){
|
||||
if (defender instanceof Player && attacker instanceof Player){
|
||||
if (!(this.plugin.worlds.get(w.getName()).pvp)) {
|
||||
this.plugin.playerSessions.get(((Player) attacker)).message(ChatColor.RED + "PVP is disabled in this World.");
|
||||
event.setCancelled(true);
|
||||
|
@ -40,9 +40,9 @@ public class MVTeleport {
|
||||
|
||||
// If the Targets Compression is 0 then we teleport them to the Spawn of the World.
|
||||
if(trgComp==0.0){
|
||||
x = world.getSpawnLocation().getX();
|
||||
x = world.getSpawnLocation().getX()+0.5;
|
||||
y = world.getSpawnLocation().getY();
|
||||
z = world.getSpawnLocation().getZ();
|
||||
z = world.getSpawnLocation().getZ()+0.5;
|
||||
} else {
|
||||
x = location.getX() / (srcComp != 0 ? srcComp : 1) * trgComp + 0.5;
|
||||
y = location.getY();
|
||||
|
Loading…
Reference in New Issue
Block a user