Properly name methods
This commit is contained in:
parent
782af5a9da
commit
184ed22422
@ -147,7 +147,7 @@ public class Chairs extends JavaPlugin {
|
||||
}
|
||||
},100);
|
||||
}
|
||||
protected void ejectPlayer(final Player player)
|
||||
protected void unSitPlayer(final Player player)
|
||||
{
|
||||
player.eject();
|
||||
final Location tploc = sitstopteleportloc.get(player.getName());
|
||||
@ -161,14 +161,14 @@ public class Chairs extends JavaPlugin {
|
||||
}
|
||||
},1);
|
||||
}
|
||||
unSit(player);
|
||||
clearSitInfo(player);
|
||||
}
|
||||
private void ejectPlayerOnDisable(Player player)
|
||||
{
|
||||
player.eject();
|
||||
unSit(player);
|
||||
clearSitInfo(player);
|
||||
}
|
||||
protected void unSit(Player player) {
|
||||
protected void clearSitInfo(Player player) {
|
||||
if (sit.containsKey(player.getName()))
|
||||
{
|
||||
sit.get(player.getName()).remove();
|
||||
|
@ -16,6 +16,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.event.player.PlayerJoinEvent;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
import org.bukkit.material.Stairs;
|
||||
import org.bukkit.material.Step;
|
||||
import org.bukkit.material.WoodenStep;
|
||||
@ -49,7 +50,7 @@ public class EventListener implements Listener {
|
||||
if (plugin.sit.containsKey(player.getName()))
|
||||
{
|
||||
plugin.savePlayerSitstoploc(player.getName());
|
||||
plugin.ejectPlayer(player);
|
||||
plugin.unSitPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
@ -60,11 +61,10 @@ public class EventListener implements Listener {
|
||||
if (plugin.sitblock.containsKey(b))
|
||||
{
|
||||
Player player = Bukkit.getPlayerExact(plugin.sitblock.get(b));
|
||||
plugin.ejectPlayer(player);
|
||||
plugin.unSitPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent event) {
|
||||
Player player = event.getPlayer();
|
||||
@ -309,7 +309,7 @@ public class EventListener implements Listener {
|
||||
if (player.isInsideVehicle()) {
|
||||
return true;
|
||||
} else {
|
||||
plugin.unSit(player);
|
||||
plugin.clearSitInfo(player);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -41,7 +41,7 @@ public class PacketListener {
|
||||
//just eject player if he is sitting on chair
|
||||
if (pluginInstance.sit.containsKey(player.getName()))
|
||||
{
|
||||
pluginInstance.ejectPlayer(player);
|
||||
pluginInstance.unSitPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ public class PacketListener {
|
||||
Player player = e.getPlayer();
|
||||
if (pluginInstance.sit.containsKey(player.getName()))
|
||||
{
|
||||
pluginInstance.ejectPlayer(player);
|
||||
pluginInstance.unSitPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user