Permalink
Browse files

Fixed NCP interfering with SignCopier.

  • Loading branch information...
me4502 committed May 22, 2017
1 parent 5d4923e commit e93b50177a6955758ae1f3d4a1cde9a9b2418ddc
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/sk89q/craftbook/mechanics/signcopier/SignCopier.java
@@ -3,6 +3,7 @@
import com.sk89q.craftbook.AbstractCraftBookMechanic;
import com.sk89q.craftbook.LocalPlayer;
import com.sk89q.craftbook.bukkit.CraftBookPlugin;
import com.sk89q.craftbook.util.CompatabilityUtil;
import com.sk89q.craftbook.util.EventUtil;
import com.sk89q.craftbook.util.ItemInfo;
import com.sk89q.craftbook.util.ProtectionUtil;
@@ -40,7 +41,7 @@ public void onRightClick(SignClickEvent event) {
if(!EventUtil.passesFilter(event)) return;
LocalPlayer player = CraftBookPlugin.inst().wrapPlayer(event.getPlayer());
LocalPlayer player = event.getWrappedPlayer();
if (!player.getHeldItemInfo().equals(item)) return;
@@ -66,6 +67,7 @@ public void onRightClick(SignClickEvent event) {
Sign s = (Sign) event.getClickedBlock().getState();
String[] lines = signs.get(player.getName());
CompatabilityUtil.disableInterferences(event.getPlayer());
SignChangeEvent sev = new SignChangeEvent(event.getClickedBlock(), event.getPlayer(), lines);
Bukkit.getPluginManager().callEvent(sev);
@@ -74,6 +76,7 @@ public void onRightClick(SignClickEvent event) {
s.setLine(i, lines[i]);
s.update();
}
CompatabilityUtil.enableInterferences(event.getPlayer());
player.print("mech.signcopy.paste");
event.setCancelled(true);

0 comments on commit e93b501

Please sign in to comment.