Add leaveSit method to api

This commit is contained in:
Shevchik 2015-01-15 12:56:37 +04:00
parent b409aa9b7a
commit ab539e5a79

View File

@ -1,18 +1,22 @@
package com.cnaude.chairs.api; package com.cnaude.chairs.api;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import com.cnaude.chairs.core.PlayerSitData; import com.cnaude.chairs.core.PlayerSitData;
public class ChairsAPI { public class ChairsAPI {
private static PlayerSitData pdata; private static PlayerSitData pdata;
protected static void init(PlayerSitData pdata) { protected static void init(PlayerSitData pdata) {
ChairsAPI.pdata = pdata; ChairsAPI.pdata = pdata;
} }
public static boolean isSitting(Player player) { public static boolean isSitting(Player player) {
return pdata.isSitting(player); return pdata.isSitting(player);
} }
} public static void leaveSit(Player player) {
pdata.unsitPlayerForce(player);
}
}