コード例 #1
0
 @CommandHelp(value = "Creates a sample pickup.")
 @Command
 public boolean pickup(Player p) {
   Location location = p.getLocation();
   location.y += 10;
   SampObjectManager.get().createPickup(351, 15, location);
   return true;
 }
コード例 #2
0
  @CommandHelp(value = "Creates a sample checkpoint.")
  @Command
  public boolean checkpoint(Player p) {
    Radius location = new Radius(p.getLocation(), 10);
    location.x += 10;

    p.setCheckpoint(
        Checkpoint.create(
            location,
            player -> {
              player.disableCheckpoint();
              player.playSound(1057);
            },
            null));

    return true;
  }
コード例 #3
0
 @CommandHelp(value = "Teleports you to a target player.")
 @Command
 public boolean tp(Player p, Player target) {
   p.setLocation(target.getLocation());
   return true;
 }