Mcpc+ Server
Hideman85 opened this issue ยท 1 comments
This mod does not compatibles with a plugin like Factions or World Guard because you can break an block who has protected by once of this plugin.
I search on google how to solve it but I don't find ;(
So how to solved it ?
I try to modify Factions to cancel BlockDamageEvent but doest not work !
I try to cancel mining Block with :
private void sendBlockBreakNull(Block block, Player p) {
Packet55BlockBreakAnimation breakBlockPacket = new Packet55BlockBreakAnimation(
0, //player.getEntityId()
block.getX(), block.getY(), block.getZ(),
0);
((CraftServer) Bukkit.getServer()).getHandle().sendPacketNearby(
block.getX(), block.getY(), block.getZ(),
60 * 2, ((CraftWorld) p.getWorld()).getHandle().dimension, breakBlockPacket);
}
does not work again !
I try on MultiMineServer on onClientSentPartialBlockPacket(...)
///////////////////////////////////////////////////////////
// TODO : cancel block mining if bukkit plugin cancel break block
PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(player, Action.LEFT_CLICK_BLOCK, x, y, z, 0);
if(event.isCanceled()){
player.sendChatToPlayer("Cancel break ! ! !");
return;
}
///////////////////////////////////////////////////////////
does not work again and again ! ;(
So Please Help Me !
As you can observe at https://github.com/AtomicStryker/atomicstrykers-minecraft-mods/blob/1.8/MultiMine/src/main/java/atomicstryker/multimine/common/MultiMineServer.java#L132, Multi Mine calls the Forge BlockBreak event. A cauldron/spigot/mcpc/whateveritscalled server should allow observation of and interaction with Forge Events.