Updating teleport data and other command info

This commit is contained in:
sekwah41 2018-02-02 09:28:20 +00:00 committed by Sekwah
parent 964bc466b4
commit 568d2517b6
2 changed files with 10 additions and 5 deletions

View File

@ -32,6 +32,6 @@ public class CommandSenderContainer {
}
public boolean hasPermission(String permission) {
return false;
return sender.hasPermission(permission);
}
}

View File

@ -1,5 +1,7 @@
package com.sekwah.advancedportals.coreconnector.container;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@ -25,21 +27,24 @@ public class PlayerContainer {
}
public boolean isOp() {
return player.isOp();
return this.player.isOp();
}
public PlayerLocation getLoc() {
return null;
Location loc = this.player.getLocation();
return new PlayerLocation(loc.getX(), loc.getY(), loc.getZ());
}
public double getEyeHeight() {
return 0;
}
public void teleport(PlayerLocation location) {}
public void teleport(PlayerLocation location) {
this.player.teleport(new Location(Bukkit.getWorld(location.worldName), location.posX, location.posY, location.posZ));
}
public boolean hasPermission(String permission) {
return false;
return this.player.hasPermission(permission);
}
/**