TrickOrTreat Wiki - Historical

Applied By timderspieler: Oct 3, 2019 at 12:35 PM

TrickOrTreat Wiki

[​IMG]


This is the official wiki page of TrickOrTreat.
If you have interest in the plugin you can purchase it here:
https://www.spigotmc.org/resources/61370
[​IMG]
  1. Purchase and download the TrickOrTreat.jar here: TrickOrTreat Download
  2. Download the latest version of Citizens here: Citiziens Download
  3. Drop the Citizens.jar and the TrickOrTreat.jar into you plugins folder.
  4. Start your server.
  5. Edit the config files in the TrickOrTreat folder.
  6. Restart your server again.
  7. ENJOY!
[​IMG] Commands:

➛ /tot help (Displays the help menu)
➛ /tot setupItem* (Gives you the setupitem)
➛ /tot reset <...>* (Reset player stats)
➛ /tot gameItem* (Gives you the gameitem)
➛ /tot stats (Displays your stats)
➛ /tot warp (Warp to the event location)
➛ /tot open (Open the game menu)
➛ /tot join / leave (Join / leave the event)

* (You need the admin permission for this)

Permissions:


➛ trickortreat.admin (Admin permission)
➛ trickortreat.player (Player permission)

[​IMG]
You can use papi placeholders in nearly all messages of trickortreat. Simply add them into the messages.yml in your disired message. Furthermore you can use trickortreat placeholders in other plugins ( Such as Tablist / Scoreboard plugins etc. ) if you have PlaceholderAPI installed.

All current PAPI Placeholders of trickortreat can be found HERE
[​IMG]

Setting up the plugin:
After installing TrickOrTreat apply the trickortreat.admin permission to your account. Now type in: /tot help. A help page should show up.
Now type in /tot setupItem. There should be a Setup-Item Stick in your inventory. SNEAK + Right-Click the stick. A inventory page should pop up. Now you can setup everything shown in the inventory:


DOORS:
To create a TrickOrTreat door follow these steps:

  1. Place a door on the ground (No iron doors) like this: [​IMG]
  2. Open the setup menu ( SNEAK + Rightclick with the setup item )
  3. Click on Door menu, Create a new door
  4. Click on set door location
  5. Rightclick on the door ( With the setup item )
  6. Click on "Save door"
  7. DONE!
When you already have placed all doors you want to add, you can use the door mass creation mode. So you only need to rightclick the doors you want to add. Follow these steps
  1. Place all doors you want to add
  2. Open the setup menu ( SNEAK + Rightclick with the setup item )
  3. Click on Door menu, Door mass creation
  4. Rightclick all doors you want to add, Leftclick all doors you want to delete ( With the setup item )
  5. If you have finished the door mass creation type in /tot cancel.
  6. DONE!
If you want to edit or delete doors you can use the door list function ( Door menu, Door list ).

INGREDIENTS:
Ingredients are random placed blocks on your map. The players need to search them because some villagers want them to find these. You can enable / disable this function in the config.yml

If you want to create these ingredients follow these steps:

  1. Place the blocks you want to have as an ingredient (Randomly on your map)
  2. Open the setup menu ( SNEAK + Rightclick with the setup item )
  3. Click on ingredient menu, Create new ingredient
  4. Click on "Set ingredient name" and type in a name for the ingredient
  5. Click on "set the block type" and select the block type you have placed before
  6. Click on "add ingredient location" and Leftclick on all blocks you have placed ( With the setup item )
  7. Now SNEAK + Rightclick to open the setup menu again and click on "Save ingredient"
  8. DONE!
You can also edit the ingredient after you have saved it: Open the setup menu, Click on ingredient menu, Click on Ingredient list and click on the ingredient you want to edit!

EVENTLOCATION:
The eventlocation is the location where the players can spawn if you have enabled the "lobby options" in the config.yml. You can teleport yourself to the eventlocation with /tot warp. To create the eventlocation open the setup menu and click on the set eventlocation item.

START TRICKORTREATING:

If you have finished all the setups above you can start the TrickOrTreating. Have fun and Happy Halloween!

ADD FLICKERING PUMPKINS:

Not spooky enough? How about flickering pumpkins? Simply open the setup menu and click on "Add flickering pumpkins". Now Leftclick all pumpkins you want to add and Rightclick the pumpkins to remove them. If you have added all pumpkins type in /tot cancel.

[​IMG]
How to implement TrickOrTreat API:


    • Check if plugin is enabled and available
      Code (Java):
      if (Bukkit.getPluginManager().getPlugin("TrickOrTreat") != null) {
         
          // DO STUFF ...
                 
      }

    • Initialize an api object in your class header
      Code (Java):
      public TotAPI tot_api;

      private void initialize() {
          if (Bukkit.getPluginManager().getPlugin("TrickOrTreat") != null) {
              tot_api = TrickOrTreat.getAPI();
          }
      }

    • Done! You can now use the API
Code (Java):

int rewards = TrickOrTreat.getAPI().getRewards(PLAYER);
// Returns amount of rewards a player has

int found_doors = TrickOrTreat.getAPI().getFoundDoors(PLAYER);
// Returns amount of found doors by a player

int doors_amount = TrickOrTreat.getAPI().getDoorAmount();
// Returns amount of set doors

boolean open = TrickOrTreat.getAPI().openGameMenu(PLAYER);
//Opens the game menu for a player and returns true or false if succeeded

public void removeRewards(Player target, int amount)
// Removes rewards from a certain player

public void addRewards(Player target, int amount)
// Adds rewards to a certain player
 
[​IMG]
All icons are from www.flaticon.com