From ab539e5a798f80e56fce566cd2a55c03ee781c78 Mon Sep 17 00:00:00 2001 From: Shevchik Date: Thu, 15 Jan 2015 12:56:37 +0400 Subject: [PATCH] Add leaveSit method to api --- src/com/cnaude/chairs/api/ChairsAPI.java | 40 +++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/com/cnaude/chairs/api/ChairsAPI.java b/src/com/cnaude/chairs/api/ChairsAPI.java index 87cdbeb..ebf4540 100644 --- a/src/com/cnaude/chairs/api/ChairsAPI.java +++ b/src/com/cnaude/chairs/api/ChairsAPI.java @@ -1,18 +1,22 @@ -package com.cnaude.chairs.api; - -import org.bukkit.entity.Player; - -import com.cnaude.chairs.core.PlayerSitData; - -public class ChairsAPI { - - private static PlayerSitData pdata; - protected static void init(PlayerSitData pdata) { - ChairsAPI.pdata = pdata; - } - - public static boolean isSitting(Player player) { - return pdata.isSitting(player); - } - -} +package com.cnaude.chairs.api; + +import org.bukkit.entity.Player; + +import com.cnaude.chairs.core.PlayerSitData; + +public class ChairsAPI { + + private static PlayerSitData pdata; + protected static void init(PlayerSitData pdata) { + ChairsAPI.pdata = pdata; + } + + public static boolean isSitting(Player player) { + return pdata.isSitting(player); + } + + public static void leaveSit(Player player) { + pdata.unsitPlayerForce(player); + } + +}