More methods for API

This commit is contained in:
Shevchik 2015-01-15 13:02:23 +04:00
parent ab539e5a79
commit 230940b71c

View File

@ -1,5 +1,7 @@
package com.cnaude.chairs.api; package com.cnaude.chairs.api;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.cnaude.chairs.core.PlayerSitData; import com.cnaude.chairs.core.PlayerSitData;
@ -15,6 +17,18 @@ public class ChairsAPI {
return pdata.isSitting(player); return pdata.isSitting(player);
} }
public static boolean isBlockOccupied(Block block) {
return pdata.isBlockOccupied(block);
}
public static Player getBlockOccupiedBy(Block block) {
return pdata.getPlayerOnChair(block);
}
public static boolean sit(Player player, Block blocktouccupy, Location sitlocation) {
return pdata.sitPlayer(player, blocktouccupy, sitlocation);
}
public static void leaveSit(Player player) { public static void leaveSit(Player player) {
pdata.unsitPlayerForce(player); pdata.unsitPlayerForce(player);
} }