Translations:TrainCarts/API/SignAction/12/en

From BergerHealer Wiki
Revision as of 12:32, 3 September 2024 by TC Bot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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());
   }

}