Advertisement
Guest User

Untitled

a guest
Aug 17th, 2023
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. Player p = Bukkit.getPlayer("Wazup92");
  2.  
  3. PartyGamesAPI.isInArena(p); //Returns true if player is inside an arena, does not matter if he is playing or not.
  4.  
  5. PartyGamesAPI.getArenaName(p); //Returns arena name, must check if player is in an arena first!
  6.  
  7. PartyGamesAPI.isSpectating(p); //Returns true if the player is inside an arena and is spectating (not participating as a player in any of the minigames)
  8.  
  9. PartyGamesAPI.isPlaying(p); //Returns true if player is inside an arena and is playing (not spectating)
  10.  
  11. PartyGamesAPI.getMinigamesFolderPath(); //Returns the path to the minigames folder. Generally speaking, you do not need to use this.
  12.  
  13. //The methods below are all useful tools for when registering your own minigames!
  14.  
  15. Cuboid cuboid = PartyGamesAPI.getPlayerSelection(p); //Returns the player selection that was made using partygames wand!
  16. if(cuboid != null) {
  17. Bukkit.broadcastMessage("Iterating over: " + cuboid.getSize() + " blocks and setting them to air!");
  18. Iterator<Block> iterator = cuboid.iterator();
  19. while(iterator.hasNext()) iterator.next().setType(Material.AIR);
  20. }
  21.  
  22. PartyGamesAPI.removePlayerSelection(p); //Sets a player partygames selection to null
  23.  
  24. PartyGamesAPI.MakeSpectator(p, true); //Gives the player the spectator effects (Invisibility and flight or simply gamemode 3 when available), this should be used when a player is eliminated from a minigame
  25. PartyGamesAPI.MakeSpectator(p, false); //Removes the player spectator effects (This should be run on eliminated players when the minigame is finished)
  26.  
  27. PartyGamesAPI.getMessage("No-Permission"); //Returns the message tagged as 'No-Permission' in customization.yml
  28.  
  29. Arena someArena = null; //You can get an arena when registering a custom minigame and extending the MiniGame class
  30. PartyGamesAPI.sendRoundConclusion(someArena, new String[] {"Wazup92", "Wazup91", "Wazup90"}); //The second parameter is a String[] whose size must be at least 3!
  31.  
  32. PartyGamesAPI.getItemStackFromString("WOOD_SWORD : 1 : enchant:DAMAGE_ALL:1"); //This is a method that reads a string and converts it to an item stack!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement