Added PlayerInteractEntityEvent which fires when a player right clicks an entity. Thanks fullwall!
Dieser Commit ist enthalten in:
Ursprung
fdb077e814
Commit
bf1f5b00d7
@ -798,6 +798,13 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
|||||||
|
|
||||||
if (entity != null && this.player.e(entity) && this.player.f(entity) < 4.0F) {
|
if (entity != null && this.player.e(entity) && this.player.f(entity) < 4.0F) {
|
||||||
if (packet7useentity.c == 0) {
|
if (packet7useentity.c == 0) {
|
||||||
|
// CraftBukkit start
|
||||||
|
PlayerInteractEntityEvent piee = new PlayerInteractEntityEvent((Player) getPlayer(), entity.getBukkitEntity());
|
||||||
|
server.getPluginManager().callEvent(piee);
|
||||||
|
if (piee.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// CraftBukkit end
|
||||||
this.player.c(entity);
|
this.player.c(entity);
|
||||||
} else if (packet7useentity.c == 1) {
|
} else if (packet7useentity.c == 1) {
|
||||||
this.player.d(entity);
|
this.player.d(entity);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren