mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-20 23:46:57 +01:00
#853: Implement Player#breakBlock()
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
0e95cf49fe
commit
8198d062f3
1 changed files with 6 additions and 0 deletions
|
@ -90,6 +90,7 @@ import org.bukkit.Particle;
|
|||
import org.bukkit.Sound;
|
||||
import org.bukkit.Statistic;
|
||||
import org.bukkit.WeatherType;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
import org.bukkit.conversations.Conversation;
|
||||
|
@ -533,6 +534,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
playEffect(loc, effect, datavalue);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean breakBlock(Block block) {
|
||||
return getHandle().gameMode.breakBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBlockChange(Location loc, Material material, byte data) {
|
||||
if (getHandle().connection == null) return;
|
||||
|
|
Loading…
Reference in a new issue