Translations:TrainCarts/API/SignAction/8/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 void execute(SignActionEvent info) {
       // When a [train] sign is placed, activate when powered by redstone when the train
       // goes over the sign, or when redstone is activated.
       if (info.isTrainSign()
               && info.isAction(SignActionType.GROUP_ENTER, SignActionType.REDSTONE_ON)
               && info.isPowered() && info.hasGroup()
       ) {
           for (MinecartMember<?> member : info.getGroup()) {
               sendGreetingForCart(info, member);
           }
           return;
       }