Repository navigation
[Sell] custom sign from custom plugin is taken over by EssentialsX #6643
Replies: 1 comment
|
EssentialsX doesn't look for You can keep the identical look and tell EssentialsX to leave your signs alone through its API event import net.ess3.api.events.SignInteractEvent;
@EventHandler(ignoreCancelled = true)
public void onEssentialsSign(SignInteractEvent event) {
if (isHeadSellSign(event.getSign().getBlock())) {
event.setCancelled(true); // EssentialsX stops here, no "You do not have ..." error
}
}For One more thing to watch: EssentialsX's listener runs at |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have built my own HeadSellSign plugin so that I can sell player_head customized items to the sign (EssentialsX does not recognize custom heads from HeadDatabase). Because I actively use EssentialsX's [Sell] signs elsewhere, I wanted my signs to look exactly the same as EssentialsX ones so that they are all unified. My signs are created in the way that I write [headsell] in the 1st line and quantity in the 2nd line so that the sign creates: [MyLabel] -> 1 ->player_head -> $500 (all 4 lines are utilized exactly as on the EssentialsX's sign). The problem shows up when I set (a configurable in config.yml) MyLabel to <dark_blue>[Sell]</dark_blue> - in such case the EssentialsX plugin takes over my sign and says: "Error: You do not have player_head". When I change MyLabel to e.g. <dark_blue>[SellHead]</dark_blue> the sign works as intended. I would like to know what can I do to force EssentialsX plugin to give up checking MyLabel on the first line of my sign so that <dark_blue>[Sell]</dark_blue> configured will not cause EssentialsX to take over that sign. I have added - sell to the list of unprotected-sign-names list, but this did not do the trick. Many thanks in advance for any help!
All reactions