Only step if they have the wand in hand.
This commit is contained in:
parent
9e950b56e4
commit
2254efe08d
@ -11,6 +11,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
|
|
||||||
import com.graywolf336.jail.JailMain;
|
import com.graywolf336.jail.JailMain;
|
||||||
import com.graywolf336.jail.JailManager;
|
import com.graywolf336.jail.JailManager;
|
||||||
|
import com.graywolf336.jail.Util;
|
||||||
|
|
||||||
public class PlayerListener implements Listener {
|
public class PlayerListener implements Listener {
|
||||||
private JailMain pl;
|
private JailMain pl;
|
||||||
@ -26,6 +27,7 @@ public class PlayerListener implements Listener {
|
|||||||
Location loc = event.getClickedBlock() == null ? p.getLocation() : event.getClickedBlock().getLocation();
|
Location loc = event.getClickedBlock() == null ? p.getLocation() : event.getClickedBlock().getLocation();
|
||||||
JailManager jm = pl.getJailManager();
|
JailManager jm = pl.getJailManager();
|
||||||
|
|
||||||
|
if(p.getItemInHand().isSimilar(Util.getWand())) {
|
||||||
if(jm.isCreatingSomething(p.getName())) {
|
if(jm.isCreatingSomething(p.getName())) {
|
||||||
if(jm.isCreatingAJail(p.getName())) {
|
if(jm.isCreatingAJail(p.getName())) {
|
||||||
jm.getJailCreationSteps().step(jm, p, jm.getJailCreationPlayer(p.getName()), loc);
|
jm.getJailCreationSteps().step(jm, p, jm.getJailCreationPlayer(p.getName()), loc);
|
||||||
@ -37,6 +39,7 @@ public class PlayerListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void chatting(AsyncPlayerChatEvent event) {
|
public void chatting(AsyncPlayerChatEvent event) {
|
||||||
|
Loading…
Reference in New Issue
Block a user