summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityNote.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityNote.java b/src/main/java/net/minecraft/server/TileEntityNote.java
index 684bbc6d..78c6b553 100644
--- a/src/main/java/net/minecraft/server/TileEntityNote.java
+++ b/src/main/java/net/minecraft/server/TileEntityNote.java
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+
public class TileEntityNote extends TileEntity {
public byte note = 0;
@@ -50,7 +52,12 @@ public class TileEntityNote extends TileEntity {
b0 = 4;
}
- world.playNote(i, j, k, b0, this.note);
+ // CraftBukkit start
+ org.bukkit.event.block.NotePlayEvent event = CraftEventFactory.callNotePlayEvent(this.world, i, j, k, b0, this.note);
+ if (!event.isCancelled()) {
+ this.world.playNote(i, j, k, event.getInstrument().getType(), event.getNote().getId());
+ }
+ // CraftBukkit end
}
}
}