mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 12:57:41 +01:00
Added Player.playNote().
This commit is contained in:
parent
98cea5cd15
commit
80a1a4ac82
@ -7,6 +7,7 @@ import net.minecraft.server.EntityPlayer;
|
|||||||
import net.minecraft.server.ItemInWorldManager;
|
import net.minecraft.server.ItemInWorldManager;
|
||||||
import net.minecraft.server.Packet200Statistic;
|
import net.minecraft.server.Packet200Statistic;
|
||||||
import net.minecraft.server.Packet3Chat;
|
import net.minecraft.server.Packet3Chat;
|
||||||
|
import net.minecraft.server.Packet54PlayNoteBlock;
|
||||||
import net.minecraft.server.Packet6SpawnPosition;
|
import net.minecraft.server.Packet6SpawnPosition;
|
||||||
import net.minecraft.server.ServerConfigurationManager;
|
import net.minecraft.server.ServerConfigurationManager;
|
||||||
import net.minecraft.server.WorldServer;
|
import net.minecraft.server.WorldServer;
|
||||||
@ -141,6 +142,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
return server.dispatchCommand(this, command);
|
return server.dispatchCommand(this, command);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void playNote(Location loc, byte instrument, byte note) {
|
||||||
|
getHandle().netServerHandler.sendPacket(
|
||||||
|
new Packet54PlayNoteBlock(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), instrument, note));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean teleport(Location location) {
|
public boolean teleport(Location location) {
|
||||||
WorldServer oldWorld = ((CraftWorld)getWorld()).getHandle();
|
WorldServer oldWorld = ((CraftWorld)getWorld()).getHandle();
|
||||||
|
Loading…
Reference in New Issue
Block a user