Translations:TrainCarts/API/SignAction/12/en
Jump to navigation
Jump to search
@Override
public boolean build(SignChangeActionEvent event) { // This is executed when a player places down a sign matching this sign action // Permissions are checked and then a message is displayed to the player // For simplicity you can use the SignBuildOptions API for this. // You are free to use your own code here that checks permissions/etc. return SignBuildOptions.create() .setName(event.isCartSign() ? "cart welcome greeter" : "train welcome greeter") .setDescription("sends a welcome message to all players in the train") .handle(event.getPlayer()); }
}