Properly name methods

This commit is contained in:
Shevchik 2013-09-30 12:27:16 +04:00
parent 782af5a9da
commit 184ed22422
3 changed files with 10 additions and 10 deletions

View File

@ -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();

View File

@ -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;

View File

@ -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);
}
}
}