Пример #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 = "Opens a sample Menu.")
  @Command
  public boolean menu(Player p) {
    Menu menu = SampObjectManager.get().createMenu("test1", 1, 0, 0, 100, 100);
    menu.setColumnHeader(0, "test2");
    menu.addItem(0, "Hello!");
    menu.addItem(0, "Hi!");
    menu.show(p);

    return true;
  }
Пример #3
0
 /**
  * Create a Label which is only visible for one player, with params. If the Creation fails, it
  * will throw a CreationFailedException.
  *
  * @param player The Player who sees the Label.
  * @param text The displayed Text.
  * @param color The color of the Label.
  * @param loc Location where the Label should be.
  * @param drawDistance The Drawdistance of the Label.
  * @param testLOS If the Label can be seen through objects.
  * @param attachedVehicle The Vehicle where the Label should be attached.
  * @return The created PlayerLabel.
  */
 public static PlayerLabel create(
     Player player,
     String text,
     Color color,
     Location loc,
     float drawDistance,
     boolean testLOS,
     Vehicle attachedVehicle)
     throws CreationFailedException {
   return SampObjectManager.get()
       .createPlayerLabel(player, text, color, loc, drawDistance, testLOS, attachedVehicle);
 }
Пример #4
0
 /**
  * Create a Label which is only visible for one player, with params. If the Creation fails, it
  * will throw a CreationFailedException.
  *
  * @param player The Player who sees the Label.
  * @param text The displayed Text.
  * @param color The color of the Label.
  * @param x X-Pos where the Label should be.
  * @param y Y-Pos where the Label should be.
  * @param z Z-Pos where the Label should be.
  * @param drawDistance The Drawdistance of the Label.
  * @param testLOS If the Label can be seen through objects.
  * @return The created PlayerLabel.
  */
 public static PlayerLabel create(
     Player player,
     String text,
     Color color,
     float x,
     float y,
     float z,
     float drawDistance,
     boolean testLOS) {
   return SampObjectManager.get()
       .createPlayerLabel(player, text, color, x, y, z, drawDistance, testLOS);
 }
Пример #5
0
 public static Collection<PlayerLabel> get(Player player) {
   return SampObjectManager.get().getPlayerLabels(player);
 }
Пример #6
0
 public static PlayerLabel get(Player player, int id) {
   return SampObjectManager.get().getPlayerLabel(player, id);
 }