Wizards

Wizards 6.0.1

Native Minecraft Version:
1.13
Tested Minecraft Versions:
1.81.121.161.171.181.191.20
Contributors:
Icon: Danu Risnandar | CryptoMorin for XMaterial and XSound
Wizards is a Domination game.
Select your Wizard class and capture the map objectives to score.

Check out the WIKI for more info!

Multi-Arena and BungeeCord support.
Achievements.
SQLite and MySQL support.
Extremely configurable.
Signs, Scoreboard, messages, options and more.
Save and restore player inventory, levels and more.
API with Game events.
Custom items.
Leveling Up/Ranking System.
Game top Kills.
Holographic Leaderboards.
Top Damage, Heal, Kills and Wins, Flags Captured
Reward System.
Kits or Classes.
Kill-Assist system.
Avoid constant draws.
Very easy to setup.
Mounts.
Powerups!
Spectator System!


Bugs
If you have any issues, report via discussion or private message. Do not use the rating area to report bugs or request features. Please go to discussion.

Default Game System
If you don't want to have skills and want to enable a kit system this is 100% possible, this system will be available soon with more gamemodes.

Dependencies
Wizards can run all systems by himself, however, you can install Holographic Displays to enable Leaderboards and Vault to work with global economy.

You can also install ItemBridge to hook with QualityArmory. You should be able to use CrackShot without ItemBridge.

PlaceholderAPI support
The following placeholders are available, they are self explanatory:

%wizards_wins%
%wizards_gamesplayed%
%wizards_losses%
%wizards_kills%
%wizards_assists%
%wizards_deaths%
%wizards_damagecaused%
%wizards_healingdone%
%wizards_balance%
%wizards_kit_name%
%wizards_kit_displayname%
%wizards_class_name%
%wizards_class_displayname%

-- Arena Placeholders --
%wizards_arena_players_{arena}%
%wizards_arena_max_players_{arena}%
%wizards_arena_min_xplayers_{arena}%
%wizards_arena_status_{arena}%
%wizards_points-to-win_{arena}%

Usage example (DeluxeMenus):


An extra placeholder is %wizards_team_color% that returns player's team color, if in game. This was added in case you need to use a third party nametag plugin.




Arena setup
Required permission: wizards.setup
First of all set global spawn using /wizards setgspawn
Create your arena - /wizards create <name>.
Add spawn - /wizards setLocation <name> <location>
Locations: BLUE_SPAWN, RED_SPAWN, RED_FLAG, BLUE_FLAG, LOBBY.
Add arena objective - /wizards setObjective <name> <objective>
Objectives: A, B, C, D, E, F, G
Objectives are a 3x3 area with e beacon on center of the objective (center set by this command)
Set min players - /wizards setMinPlayers <name> <amount>
Set max players - /wizards setMaxPlayers <name> <amount>
(Optional) Set arena bounds /wizards setBounds <arena>
Use the tool /wizards wand to select arena corners.
It will prevent players from leaving the arena while in-game.
Finish setup and create game - /wizards finish <name>
Objectives are a 3x3 area with e beacon on center.

Optional setup commands
/wizards addPowerup <name>
/wizards setPointsToWin <name> <amount>
/wizards portals

Sign format:
[Wizards]
join
ArenaName
Video:


Leaderboards
You need HolographicDisplays to work with Leaderboards, just use the placeholder:
{wizards_wins_number}
e.g: {wizards_wins_1} will return player with most wins.
{wizards_wins_2} etc
{wizards_kills_number}
e.g: {wizards_kills_1} will return player with most checkpoints
{wizards_kills_2} etc
Placeholders:
{wizards_kills_NUMBER}
%kills% from player.
{wizards_wins_NUMBER}
%wins% from player.
{wizards_damage_NUMBER}
%damage% from player.
{wizards_healing_NUMBER}
%healing% from player.





Command: wizards
Aliases: wzds, wrz.
/wizards join <arena> - no permission.
/wizards leave - no permission.
/wizards stats - no permission.
/wizards achievements (type) - no permission.
types: WINS, GAMES, KILLS
Manager commands

/wizards setgspawn - wizards.admin
/wizards start <arena> - wizads.moderator/sr.admin
/wizards stop <arena> - wizads.moderator/sr.admin
/wizards reload - wizards.admin
SAVES all config files.
Others:
/wizards coins set/add/remve <player> <amount>
Permission: wizards.admin
Updates player balance, command will not work with Vault support enabled.
/wizards update <player>
Permission: wizards.admin
Sends a update to database.
/wizards updateLeaderboard
Permission: wizards.admin
Updates the Leaderboard.
/wizards portals
Permission: wizards.admin
Manage arena portals (see below)
/wizards reloadClasses
Permission: wizards.admin
Will reload all classes files, you can now modify a value then use this command to apply the changes.
This command reloads all events, so it cannot be used if there is a game running.
/wizards kits
Permission: wizards.manager.kits
/wizards kits create <name> (price) (needsPerm) (perm) (display-item)
() are for optional arguments, it has default values: 1000, false, kits.{name}, random item with kit's name.
I'd recommend you to manully modify your kit in kits file then using kits reload command.
/wizards kits delete <name>
Deletes a kit from kits.yml.
/wizards kits reload
Reloads all kits.
/wizards applyKit <player>
Gives the player's current kit items.
Permission: wizards.applyKit
/wizards giveKitItems <player> <kit>
Give kit items to a player.
Permission: wizards.giveKit
/wizards selectkit <player> <kit>
Sets a kit to a player
Permission: wizards.selectKit


Classes
The main objective of all classes are the same - shoot a spell or projectile to cause damage, you will decide everything else of the class.



Suggestions for classes are appreciated.
Pyromancer
Fires a spell of Fire, you can modify everything else at pyromancer.yml.
Aquamancer
Fires a spell of water, you can modify everything else at aquamancer.yml.
Can heal allies, you can set the amount and area of healing.
Herobrine
Fires a particle spell that will strike and bump up the damage, you can modify everything else at herobrine.yml.
Wither
Fires a wither skull, you can modify everything else at wither.yml.
Enderman
Fires a ender spell and has a RECALL ability.
Mage
Fires a spell that will follow players until collide or until reaches the travel-limit.
Fighter
Loads a single-target super punch.
Crusader
Creates a temporary shield for you and to nearby teammates.
Shaman
Creates a tornado pushing players and applying slow.
Arcanist
Shots a instant spell that will cause area damage if impacts on a enemy.
Creeper
Creates a explosion causing knockback and damage.
Cryomancer
Fires a spell of Ice, applying slow. You can modify everything else at cryomancer.yml.
Squid
Summons circles around nearby enemies, healing you and your allies and causing damage.
Cosmos
Summons a meteor causing AoE damage.
Boulder
Throws a pile of blocks causing AoE damage.
YinYang
A class that can cause damage to enemies and heal teammates at the same time!
Animal
Throw mob as projectiles that can heal or deal damage!
Surge
Aim to a player or location to create a field of particles that will target each player.
Frostbolt
Shots a bolt of ice.
You can modify everything of all classes, the damage, explosion area and more.

Code (Text):

display-name: 'Aquamancer'
description:
- '&9Aquamancer'
- ' '
- '&7Shots a spell of Aqua'
- '&7causing damage to enimies and'
- '&7healing teammates.'
price: 500
mana-cost-per-use: 25
mana-per-hit: 2
max-distance: 80
damage: 2.5
damage-area: 4.0
explosion-radius: 2.5
display-item: 'IRON_AXE: 1'
weapon: 'IRON_AXE : 1 : name:&bHealing'
helmet: 'IRON_HELMET : 1'
chestplate: 'IRON_CHESTPLATE : 1'
leggings: 'IRON_LEGGINGS : 1'
boots: 'IRON_BOOTS : 1'
scripts: []
target-scripts: []
Optional: Class Permission
By setting Options.Use-Class-Permission-As-Owned to true, players with the class permission will be able to select the class without needing to purchase it.

If Options.Use-Class-Permission-As-Owned is set to false, players will need the permission to purchase the class.

For that, make sure to add a 'permission' line to the class file, for example:


With version 3.0 or above you can give items to players using Classes.

Code (Text):
display-name: 'Herobrine'
description:
- '&9Herobrine'
- ' '
- '&7Shots a spell of Lightning'
- '&7causing with &c3.0❤ &7of damage.'
price: 1000
mana-cost-per-use: 35
mana-per-hit: 1
max-distance: 80
damage: 6.0
damage-area: 5.0
explosion-radius: 4.5
weapon: 'GOLDEN_AXE : 1 : name:&bStrike'
helmet: 'IRON_HELMET : 1'
chestplate: 'IRON_CHESTPLATE : 1'
leggings: 'IRON_LEGGINGS : 1'
boots: 'IRON_BOOTS : 1'
scripts: []
target-scripts: []
items:
- 'ARROW : 64'
So just add
Code (Text):
items:
- 'ITEM : AMOUNT'
Full tutorial on items can be found in pyromancer.yml at your classes folder.

(API) Creating your own Class
A quick note on this, you cannot use the class reload command when using the API to inject a new class, it will not register the class injected via API. Create your own reload command and access the API to manually reload and register your class again.

To create your own class, simple create a new Class that extends WizardClass and register on your onEnable using

Code (Text):
WizardClasses.injectClass(Class<? extends WizardClass> clazz, String name, String fileName);
Where Class<? extends WizardClass> will be your Class, name the (original) name of the class and fileName the file name that will be generated.

After that, you need to manually add your class to the shop.yml.

Example:

Code (Text):
import com.floodeer.wizards.Wizards;
import com.floodeer.wizards.game.GamePlayer;
import com.floodeer.wizards.game.classes.WizardClass;
import com.floodeer.wizards.particles.ParticleEffect;
import com.floodeer.wizards.script.ScriptManager;
import com.floodeer.wizards.util.ItemFactory;
import com.floodeer.wizards.util.LocationUtils;
import com.floodeer.wizards.util.Util;
import org.bukkit.Location;
import org.bukkit.entity.Player;

import java.io.File;

public class Reaper extends WizardClass {

public Reaper(String name, File configFile) {
super(name, configFile);
}

@Override
public void give(Player player) {
player.getInventory().addItem(ItemFactory.unbreakable(getWeapon()));
player.getInventory().setHelmet(ItemFactory.unbreakable(getHelmet()));
player.getInventory().setChestplate(ItemFactory.unbreakable(getChesplate()));
player.getInventory().setLeggings(ItemFactory.unbreakable(getLeggings()));
player.getInventory().setBoots(ItemFactory.unbreakable(getBoots()));
}

@Override
public void onInteract(Player player) {
GamePlayer gp = GamePlayer.get(player.getUniqueId());
if (gp.getMana() < getManaCost()) { //Mana Manager
if(!Wizards.get().getMessages().enoughMana.isEmpty())
gp.getP().sendMessage(Util.colorString(Wizards.get().getMessages().enoughMana.replaceAll("%prefix%", Wizards.get().getMessages().prefix)));
if(!Wizards.get().getOptions().enoughMana.isEmpty())
Util.playSound(gp.getP(), Wizards.get().getOptions().enoughMana);
} else {
ScriptManager.run(gp, getScript()); //Script system, if enabled

gp.setMana(gp.getMana() - getManaCost()); //Remove player mana

//Skill start
Location location = player.getLocation();

//Skill Particle Effect
LocationUtils.getCircle(location.clone().add(0.0D, 1.0D, 0.0D), 5.0D, 40).forEach(l -> {
ParticleEffect.CRIT_MAGIC.display(0.0F, 0.0F, 0.0F, 0.1F, 3, l, 126);
ParticleEffect.CLOUD.display(0.0F, 0.0F, 0.0F, 0.01F, 1, l, 126);
});

//Apply skill damage and effects
Util.filterAreaDamage(player, getDamage(), location, getAreaDamage(), false, Wizards.get().getMessages().magic).forEach(target -> {
ScriptManager.run(gp, GamePlayer.get(target), getTargetScript());
GamePlayer targetgp = GamePlayer.get(target);
targetgp.setMana(0);
target.sendMessage(Util.colorString("&cYour mana has been devoured by &4" + player.getName() + "&c!"));
});

//Skill end
}
}
}
To tell Wizards that you have a class to add, add the following code to your onEnable

Code (Text):
WizardClasses.injectClass(Reaper.class, "Reaper", "reaper.yml");
Where Reaper is the class that extends WizardClass, Reaper is the Original name and reaper.yml the class file name that will be generated so you can change it however you want.

After creating the class, you need to manually add to the shop.yml;
Code (Text):
reaper:
item: 'DIAMOND_SWORD : 1'
name: '&6Reaper Class'
lore:
- '&7Removes mana from'
- '&7nearby players.'
slot: 23
Where's everything you need from WizardClass
Code (Text):


public String getOriginalName();

public String getDisplayName();

public List<String> getDescription();

public int getPrice();

public int getMaxDistance();

public int getManaCost();

public ItemStack getHelmet();

public ItemStack getChesplate();

public ItemStack getLeggings();

public ItemStack getBoots();

public ItemStack getWeapon();

public double getDamage();

public double getAreaDamage();

public double getExplosionRadius();

public List<String> getScript();

public List<String> getTargetScript();

public int getManaPerHit();

public Collection<PotionEffect> getEffects();

public List<ItemStack> getItems();
Everything from here is taken from your class.yml, you can, of course, ignore all of that and create the class however you want without interacting with the class file.

That's it! There was no plan to let you add Classes via the API, but since it was possible to make it work... why not.

Classes: Explosions
You can either disable or limit the explosions from the special abilities.

To turn explosions off, go to settings.yml and set Explosions to false.

You can also limit the explosion, for example, you can disable explosions for blocks below Y coordinate:

Map config option at Min-Y-Explosions
This option will limit the block explosions for the Y coordinate, for example, if this is set to 32, all blocks below the Y=32 will not explode.
This can be done by editing the map file before the server stars or using /wizards setExplosionLevel <arena> <Y level>
You must finish the arena after using this command to save and apply the changes.

Kits
You can use Kits instead of classes.

Enabling Use-Kits-Instead-Of-Classes in options.yml will disable all Game Effects caused by the Classes
No more speed and jump.
No more custom PvP damage.
No more Classes Shop, only kits.
No more custom Healing potions.
No more double-jumps.
Extra Kit Options

You can add these lines to execute commands, both of them has the %player% placeholder.

A kit.yml file will be created and you will be able to add your kits.
Spoiler: kits.yml


















































Wizards Gamemodes
Some users are using Wizards as a TDM Gamemode and/or playing with Guns, this is totally possible! You can disable all game objectives and set points per kill.

For the default Domination gamemode, you can check those options below.


Examples
Capture-Rate: Default > 1
Decrease to add capture time.
Capture-Max: Default > 24
Increase to add capture time.
Unbreakable-Armor
Enable or disable explosions.
Modify points per kill, points per second, game ticks that change game events, hand-damage, weapon damage and more.
A lot more! Check options.yml below.

Updates & Timer
Code (Text):

Options:
Game:
Mana-Update-Type: '75'
This means that the update type is set to TICK_2 (1 mana every0,075s)

Update division

Code (Text):
SEC = 1000 (1s)
FAST = 500 (0,5s)
FASTER = 250 (0,25s)
FASTEST = 125 (0,125s)
TICKS_2 = 75 (0,075s)
TICK = 49 (0,049s)
Leveling Up System
Disabled by default. Enable it at options.yml.

When enabled, a new file will be generated, levels.yml, with this file you will be able to add your levels, rewards and more:

Code (Text):

Levels:
Level-1: #Do not change the Level-1 section
exp: 0 #Required Exp
display-name: "&6Level 1" #Display name in level up message
prefix: "&6[1]" #Chat prefix, if enabled, hooked to PAPI
commands-to-execute: [] #Commands to execute when reaching the level
level-up-message: [] #Message to display
Level-2: #From now on you can change
exp: 10
display-name: "&6Level 2"
prefix: "&6[2]"
commands-to-execute:
- wizards coins add %player% 100
level-up-message:
- '&7&m--------------&7[&6&lWIZARDS&7]&m--------------'
- ''
- '&a&lLevel Up &e&l%level%'
- ''
- '&9Next level: &b%next_level% &7(%until_next_level%/%next_level_exp% EXP)'
- ''
- '&7&m-------------------------------------'
Level-3:
exp: 20
display-name: "&6Level 3"
prefix: "&6[3]"
commands-to-execute:
- wizards coins add %player% 100
level-up-message:
- '&7&m--------------&7[&6&lWIZARDS&7]&m--------------'
- ''
- '&a&lLevel Up &e&l%level%'
- ''
- '&9Next level: &b%next_level% &7(%until_next_level%/%next_level_exp% EXP)'
- ''
- '&7&m-------------------------------------'
Please do not change Level-1 as it is the default Database value, you can just use display-name to not show "Level-1" in game, the section name is just a backend thing.

Note that the reload command will not apply changes for levels.yml ATM.

How to Earn Exp
Players can earn Exp by playing, kills/assists, wins cand capturing points, check options.yml and you will see a new Exp section to modify.

Give Exp to old players

Set Options.Update-Levels to true in options.yml, when a player joins the server after this update, players will get exp based on wins, games played and kills/assists.

Note that some exp methods (like point captured) is not stored to calculate.

What if I don't want to use Leveling system?
Just don't enable the option. Everything will work just fine without it.

NEW: CTF
NOTE: This feature is in BETA, please report bugs at discussion or Private Message.

Holographic Displays & ProtocolLib are recommended to use CTF so each team can see the flag holograms correctly.



This is not a separated game mode, you can set your arena to be CTF but there's no CTF wins or anything like that.

Key game features:
Your flag has to be safe for you to capture the enemy flag
The flag has 5 states: Safe, Stolen, Dropped, Captured, Respawning
Fully Holographic System
Scoreboard flag data
All sounds & messages can be changed
Works with classes and kits
You can make it works however you want
You can enable or disable certain skills for the flag carrier, like Crusader's Shield, Enderman's Recall and Double Jump.


The CTF can be played along the other game modes as well! You can add game objectives, CTF flags and use the KOTH system all at the same time.

To enable CTF go to Options.Game.CTF.Enable-Game-Tasks and set it to true, this will enable some tasks for the game to work. This is a option because if CTF is not being used the task would be still be running but doing nothing so the tasks will just not run if this is not enabled to save server resources.

After enabling the game tasks, you can add the flags to your arena by using
/wizards setLocation <arena> RED_FLAG and BLUE_FLAG
That's it! You can now customize the game mode. There's a ton of options, sounds and messages - everything is separated by a CTF section in config, so look for those.

Additionally, if you want to use CTF in some arenas and not on others, you can! Just like the Objectives Placeholder in scoreboard you can use %ctf%. If the game does not detect any flags this placeholder will just be empty and the Scoreboard line will be reduced accordingly.

Other Scoreboard Placeholders:
%red_flags_captured%
%blue_flags_captured%
When capturing a flag you can add points to the team OR set a specific amount of flags that a team has to capture to win:

By setting Captures-To-Win to -1, the score system will be used. You can also set Score-To-Win to -1 and Captures-To-Win to positive value if you don't want kills to be part of the game; players can still get points by kills.



For classes, your Objective-Protection-Size at map config will apply to flags.

Very important config settings to know what they do:
Options.Game.CTF.Flag-Location-Threshold
The distance that the player needs to be to capture a flag
Options.Game.CTF.Update-Type
How frequent should the capture flag check update be, check Updates & Timer at plugin's page for more. Default is FAST (0.5 sec)
Everything is customizable.



Known issues:
When Always-Drop-Flag-On-Ground is set to true, the flag will sometimes not be visible, this is due how the server checks for the highest block, it's a very rare problem but it can happen.

Scoreboard

You can fully customize the Scoreboard.
Players that are not in a game/in same game (or no playing) will not see colored tablist for teams.



In-Game Placeholder list:
%kit% - Player kit or class.
%formatted_time% - Game time in mm:ss
%kills% - Game Kills
%deaths% - Game Deaths
%red_points% - Red points
%blue_points% - Blue points
%red_points_per_second% - Red points per second
%blue_points_per_second% - Blue points per second
%objectives% - Will replace all next lines with the amount of objectives you have.
%ctf - Will replace all lines with the CTF format at messages file.
Lobby placeholders list:
%players% - Current number of players
%maxplayers% - Max amount of players
%minplayers% - Min amount of players
%mapname% - The map name
%timer% - Starting timer
%state% and %capitalize_state% - Game state
%wins% - Player wins stat
%games_played% - Player Games played stat
%balance% - Player balance
%kit% - Player kit or class.
Avoid Draw System
To avoid constant draws you can enable the avoid-draw system.

If game reaches max time will end in a Draw, however, with avoid-draw the game will check the team with most kills and this team will win.

If both teams has same amount of kills the game will draw - A overtime system was tested but not implemented.

Teams
There are two teams, so the amount of players per team is the division of max players per game by 2, make sure to set the max of players multiples of 2.

If the team size is smaller than game player amount divided by 2 the player will not be able to join.

Portals
This is a game mechanic to be used with Elytra, it will give you a velocity boost.


Some information about the portals:
Each portal can have different particle, velocity and more.
Portals are saved in arena folder.
They are not saved in arena file due dynamic access, arena file should not be constantly accessed.
Each portal will have a different name in arena file so you can indentify them.
Here's a example of an portal file.
Spoiler: Screenshot

Mounts
You can enable mounts if your map is too big and you don't have jump or speed enabled, mounts will work with kits or classes.

Some information about the mount system:
You will receive a item (you can edit this item) when game starts, right click on it to spawn your horse.
Horses will not receive damage, however he will despawn if the passenger receives any damage.
Horse will despawn when you press shift.
You can modify the horse varient, speed and jump.
Has a cooldown to use, you can modify it.
Cooldown will trigger after you dismount the horse.

This feature is disabled by default so you will not receive the mount item. You can enable it on the options.yml file.

Guns
Quality Armory
You will need ItemBridge to work with Quality Armory.
Set ItemBridge to true in options.yml.
Set the weapon/ammo name the same as provided by Quality Armory.
Add 'weapon' tag to the item in kits.yml
Example:
Code (Text):
weaponTest:
needs-permission: true
permission: "wizards.kits.weapons"
slot: 3
price: 200
display-item: 'CROSSBOW : 1 : name:ak47'
helmet: 'IRON_HELMET : 1'
chestplate: 'IRON_CHESTPLATE : 1'
leggings: 'IRON_LEGGINGS : 1'
boots: 'IRON_BOOTS : 1'
items:
- 'CROSSBOW : 1 : weapon : name:ak47'
- 'CROSSBOW : 1 : weapon : name:kar98k'
lore:
- '&7Test weapon kit'
potion-effects: []
WeaponMechanics
To enable it, go to settings.yml -> Options.WeaponMechanics and set it to true

Usage example (kits.yml):

ITEM : AMOUNT : weapon : name:Weapon Name
You can put any item here, it will be replaced to the weapon.
I'm not sure if using special characters on kit name at the top (AK47) will cause any problems, avoid it just in case.
Make sure to use the weapon tag or else it won't work.

Crackshot
You now need to use the weapon tag and correct weapon name.
Example: FEATHER : 1 : weapon : name:AK-47
Note that you need to set Options.CrackShot and restart the server.
Custom Item Tags & ModelData
HideItemInfo (custom flag)
Will hide attributes, unbreakable, enchants, dye and Potion Effects.
Example:
Code (Text):
item: 'GOLDEN_HOE : 1 : HideItemInfo'
Item Flags - ItemFlag
Example:
Code (Text):
item: 'GOLDEN_AXE : 1 : ItemFlag:HIDE_ATTRIBUTES'
(1.14+) CustomModelData - ModelData:{Value}
Example:
Code (Text):
item: 'CARROT_ON_A_STICK : 1 : ModelData:1'
dye: Can be both the color name of RGB
Code (Text):
helmet: 'LEATHER_HELMET : 1 : dye:4873336'
NBT Support
Set Options.Always-Use-NBT to true and items will be saved and loaded as NBT. Note that is the entire item data, not just tags, for example
Code (Text):
display-item: 'DIAMOND_SWORD : 1 : NBT:{id:"minecraft:diamond_sword",Count:1b,tag:{AttributeModifiers:[0:{UUIDMost:471157,UUIDLeast:384572,Amount:14,Slot:"mainhand",AttributeName:"generic.maxHealth",Operation:0,Name:"generic.maxHealth"},1:{UUIDMost:699344,UUIDLeast:129385,Amount:2,AttributeName:"generic.movementSpeed",Operation:0,Name:"generic.movementSpeed"}]},Damage:0s} : enchant:DAMAGE_ALL:1 : enchant:KNOCKBACK:1
: name:&6Fighter : lore:&f&lLine1 : lore:&f&lLine 2: &eLine2'
Game Arena
Spawn-Protection-Size & Objective-Protection-Size
In your arena.yml you will see Spawn-Protection-Size and Objective-Protection-Size, this will set the protected area where skills cannot explode blocks.

Spectator Mode
You can spectate a game by using /wizards spectate <game>. Spectator has a different scoreboard from the normal game, you can change its lines on language file.

For BungeeCord, set Options.Spectate-When-In-Game to true and players will be added to the spectator mode if the match is in IN GAME state.

It will not work if the game is starting or ending, you will receive the message at Messages.Cannot-Spectate.

The spectator spawn location can be added via the command
/wizards setLocation <arena> SPEC_SPAWN

Powerups
There are only 4 powerup type at the moment, but you can add your own powerups via the API, see below.

Check the WIKI for more info on Powerups.
To create your own Powerup, create a new class that extends Powerup, example:
Code (Text):
public class MyPowerup extends Powerup {


public MyPowerup(String configIdentifier, Location location, long interval) {
super(configIdentifier, location, interval);
}

@Override
protected Item respawnPowerup(Location location) {
return null;
}

@Override
protected void onPlayerPickup(Player player) {

}
}
Now, you can create your Powerup Item and Powerup Action.

The Identifier is the name in map config and the name you will use to add the Powerup location via command.
Code (Text):
public class MyPowerup extends Powerup {


public MyPowerup(Location location, long interval) {
super("MYPOWERUP", location, interval);
}

@Override
protected Item respawnPowerup(Location location) {
Item item = location.getWorld().dropItem(location, new ItemStack(Material.BLAZE_POWDER));
item.setVelocity(new Vector(0, 0, 0));
item.teleport(location.clone().add(.5, 0, .5));
return item;
}

@Override
protected void onPlayerPickup(Player player) {
GamePlayer.get(player).setMana(99);
player.sendMessage(ChatColor.RED + "Filled your mana!");
}
}
That's it! You now have your own powerup.

Now, you need to register the Powerup Spawn and add the powerup to your games. You will need to use the new event made for this: GameArenaLoadEvent.

You will need to access the GameArena and the Map that contains the Locations for each Powerup Type, made this way to be easier for developers.

Code (Text):

@EventHandler
public void onArenaLoad(GameArenaLoadEvent e) {
e.getGame().registerPowerupSpawn("MYPOWERUP");
e.getGame().getGameArena().getPowerups().get("MYPOWERUP").forEach(location ->
e.getGame().getPowerups().add(new MyPowerup(location, 15000L)));
}
Spawns are automatically handled by the Game.

And it's done.

You can now add your powerups to the arena using the command.

For Developers, a quick note here, make sure all your Powerup names are in UPPER CASE, this is not a mechanic limitation, it is just to make it easier when setting up the arena and getting names from config files.

For admins who are setting up the arena it doesn't metter, you can use upper or lower case, it will convert to uppercase anyways.

One Class/Kit Per Game

This option is quite complicated so please read everything if you want to use it. When enabled, two players on the same team cannot use the same kit/class

Can be enabled at Options.One-KitClass-Per-Teammate
Message: Messages.Kit-Already-Selected-By-Other
This also work for classes.
When enabled, the player will never haver a kit selected when joining a game.
If the game starts before a player chooses a kit, you can do the following: Check Options.Game.Action-When-Player-Kit-Is-Null
Actions
SHUTDOWN_GAME - Cancels the game
FORCE_RANDOM_DEFAULT - Forces a random kit anyways, it will result in duplicates.
REMOVE_PLAYER - Removes players without a kit from the game
GIVE_KIT_KITNAME - Gives a predetermined kit, for example GIVE_KIT_ARCHER
RESTART_COUNTDOWN - Set the game to starting again.

Extra permissions
wizards.joinfull - Allows you to join in full games.
wizards.kits.all - Access to all classes/kits.
Common problems
FPS Instability
This is a minecraft-side problem, I can't do much about it.

Disabling fireworks, explosions and falling blocks in config should help.

Script system won't work on Java 11+
No plans to fix that, script system works better in Java 8.

(This is fixed in v3.0)
Code (Text):
Caused by: java.lang.IllegalArgumentException: No enum constant org.bukkit.Sound.....
How to fix:
If you are using 1.9 or above, you have to change all sound values in options.yml to 1.9.
Please DO NOT use /reload with Wizards.

Sounds List

Potion Effect Types

Material list

API

Code (Text):

import org.bukkit.event.EventHandler;

import com.floodeer.wizards.api.DamageBlockEvent;
import com.floodeer.wizards.api.GameEndEvent;
import com.floodeer.wizards.api.GameStartEvent;
import com.floodeer.wizards.api.PlayerAchievementEvent;
import com.floodeer.wizards.api.PlayerHitEvent;
import com.floodeer.wizards.api.PlayerSkillUseEvent;
import com.floodeer.wizards.game.GamePlayer;
import com.floodeer.wizards.game.achievements.AchievementType;

public class APIShowcase {

WizardsAPI api = null;

public APIShowcase() {
api = Wizards.getAPI();
}
//API methods

public GamePlayer getPlayerData(Player bukkitPlayer);

public GamePlayer getPlayerData(UUID uuid);

public GamePlayer getPlayerData(String name);

public Game getGame(String name);

public Game getGame(GamePlayer fromPlayer);

public void saveData(Player... players);

public boolean forwardData(Player player, String server, String key);

public List<LeaderboardManager.LeaderType.LeaderData> getTopData(LeaderboardManager.LeaderType type);

public LeaderboardManager.LeaderType.LeaderData getOfflineData(LeaderboardManager.LeaderType type, String player);


//Events
@EventHandler
public void onSkillUse(PlayerSkillUseEvent event) {
GamePlayer player = event.getPlayer();
if(player.getP().isSneaking())
player.setMana(player.getMana()+5);
}

@EventHandler
public void onGameStart(GameStartEvent event) {
event.getGame().sendTitle("The", "start");
}

@EventHandler
public void onGameEnd(GameEndEvent event) {
event.getWinner().getPlayers().forEach(player -> player.sendMessage("You won!"));
}

@EventHandler
public void onAchievement(PlayerAchievementEvent event) {
if(event.getType() == AchievementType.WINS) {
event.getPlayer().sendMessage("Wins!");
}
}

@EventHandler
public void onPlayerDamage(PlayerHitEvent event) {
GamePlayer damager = event.getDamager();
GamePlayer target = event.getPlayer();
if(target.getName().equalsIgnoreCase("Floodeer")) {
event.setCancelled(true);
}else{
if(!target.getP().isSneaking())
event.setDamage(event.getDamage() + 2);

damager.getP().sendMessage("Hit " + target.getName() + " with " + event.getDamage() + " of damage.");
}
}

@EventHandler
public void onDamageBlock(DamageBlockEvent event) {
GamePlayer damager = event.getDamager();
GamePlayer blocker = event.getPlayer();
if(blocker.getP().isSneaking()) {
event.setDamage(event.getDamage()/2);
}
blocker.getP().sendMessage("Blocked " + event.getDamage() + " from " + damager.getName());
}
}
Files and Screenshots
Spoiler: Screenshots










UTF-8 support for all files.

Spoiler: {arena}.yml




















































Spoiler: language.yml
































































































































































































Spoiler: options.yml

























































































































































Spoiler: {class}.yml























Q&A
Q: The game says the team is full but there is no player on the team/team is not full.
A: This happens because of the team balancing system that tries to match teams according the amount of players.

Q: What can I do with the Script system?
A: Script system is very simple, was just made to run small tasks like summon methods, all the info are above.

Q: Can I add more classes?
A: Yes, check above to see how.

Q: Plugin is causing TPS problems, what can I do?
A: You should not run Wizards with low memory, try disabling some particles, explosions or/and game effects like falling blocks and fireworks. Also try using kits if your server is not supporting the plugin. Wizards tasks should not cause your server any performance instability. Also note that each arena is a world.

Q: Why is wizard's size more than 390KB?
A: There's a lot of files inside the plugin, not just code. Whenever a class is not used or gets deprecated a update should replace or remove them, there's also a lot of things for planned features.

If you have any suggestions go to Discussion and I'll be happy to read them.

Donations & Special Thanks
User @Galexrt - $20
User @Maybe_c - $5
By buying Wizards you agree to
You are not allowed to distribute this plugin.
You are not allowed to decompile this plugin.
Use only for your network/server.
NO refunds.
All support given is on Spigot only. You will not have Discord, Skype or any of those type of contact to ask for support.
I'll probably reply in a few minutes, otherwise wait at least 12 hours or check my profile to see any updates.
Accept future terms.
Want to donate? Buy me a coffee.
Author
Mined
Downloads
25
Views
52
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Mined

Top