Prevents sign editing from triggering when changing a sign line
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
All checks were successful
KnarCraft/PlaceholderSigns/pipeline/head This commit looks good
This commit is contained in:
parent
82032dbbbc
commit
788be0cdcd
@ -39,6 +39,9 @@ public class SignClickListener implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
// Cancel the event to prevent vanilla behavior
|
||||
event.setCancelled(true);
|
||||
|
||||
String[] lines = sign.getSide(Side.FRONT).getLines();
|
||||
lines[request.line()] = request.text();
|
||||
|
||||
|
@ -19,7 +19,7 @@ import java.util.Map;
|
||||
public class SignTextListener implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onSignCreate(SignChangeEvent event) {
|
||||
public void onSignCreateOrEdit(SignChangeEvent event) {
|
||||
// Only check for placeholders if the player is allowed to
|
||||
if (!event.getPlayer().hasPermission("placeholdersigns.placeholder")) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user