Fixed ENTITY_INTERACT event for BlockSoil. Thanks wizjany!
Dieser Commit ist enthalten in:
Ursprung
0740e0c777
Commit
2a9c15c976
@ -4,6 +4,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
import org.bukkit.event.Cancellable;
|
import org.bukkit.event.Cancellable;
|
||||||
import org.bukkit.event.block.Action;
|
import org.bukkit.event.block.Action;
|
||||||
@ -56,7 +57,7 @@ public class BlockSoil extends Block {
|
|||||||
cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, Action.PHYSICAL, i, j, k, -1, null);
|
cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, Action.PHYSICAL, i, j, k, -1, null);
|
||||||
} else {
|
} else {
|
||||||
cancellable = new EntityInteractEvent(entity.getBukkitEntity(), ((WorldServer) world).getWorld().getBlockAt(i, j, k));
|
cancellable = new EntityInteractEvent(entity.getBukkitEntity(), ((WorldServer) world).getWorld().getBlockAt(i, j, k));
|
||||||
Bukkit.getServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
|
((CraftServer)Bukkit.getServer()).getPluginManager().callEvent((EntityInteractEvent) cancellable);
|
||||||
}
|
}
|
||||||
if (cancellable.isCancelled()) {
|
if (cancellable.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren