mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +01:00
Possible fix for greeting spam
This commit is contained in:
parent
ef3380dc0a
commit
f07ac646f3
@ -1187,14 +1187,13 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
}
|
}
|
||||||
lb = new BukkitLazyBlock(blockId, block);
|
lb = new BukkitLazyBlock(blockId, block);
|
||||||
ItemStack hand = player.getItemInHand();
|
ItemStack hand = player.getItemInHand();
|
||||||
if (eventType != null) {
|
if (eventType != null && (eventType != PlayerBlockEventType.INTERACT_BLOCK || !player.isSneaking())) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Material type = (hand == null) ? null : hand.getType();
|
Material type = (hand == null) ? null : hand.getType();
|
||||||
int id = (type == null) ? 0 : type.getId();
|
int id = (type == null) ? 0 : type.getId();
|
||||||
if (id == 0) {
|
if (id == 0) {
|
||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
lb = new BukkitLazyBlock(0, block);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (id < 198) {
|
if (id < 198) {
|
||||||
@ -1689,7 +1688,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot now = area.getPlotAbs(loc);
|
Plot now = area.getPlot(loc);
|
||||||
Plot lastPlot = pp.getMeta("lastplot");
|
Plot lastPlot = pp.getMeta("lastplot");
|
||||||
if (now == null) {
|
if (now == null) {
|
||||||
if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) {
|
if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) {
|
||||||
@ -1762,7 +1761,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
|||||||
if (area == null) {
|
if (area == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Plot now = area.getPlotAbs(loc);
|
Plot now = area.getPlot(loc);
|
||||||
Plot lastPlot = pp.getMeta("lastplot");
|
Plot lastPlot = pp.getMeta("lastplot");
|
||||||
if (now == null) {
|
if (now == null) {
|
||||||
if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) {
|
if (lastPlot != null && !plotExit(pp, lastPlot) && this.tmpTeleport) {
|
||||||
|
Loading…
Reference in New Issue
Block a user