V2 Install Setup of the plugin - CraZyRc/WhackaMole GitHub Wiki
Installing the Plugin
To use the plugin you need to download the plugin at Spigot. Once you've downloaded the plugin you drag and drop the plugin into your plugins folder and start your server.
Dependencies
Depending on how "Vanilla" you keep your server, you may need to add some additional plugins. The plugin uses two ways of payment when a player finishes a game. Either you will need to set up a vanilla scoreboard system where players will earn their money. Or you make use of an economy plugin. If you use a Scoreboard system, you don't need to download additional plugins. If you use an economy plugin, you will need Vault and an economy plugin compatible with Vault (check the Vault spigot page to see which plugins are compatible).
Setup
once you have installed the plugin and you launch it for the first time, you will have to set up the plugin before you can properly use it.
Config file
The first thing you will need to do is change some things in the Config file. The config file is set up in different sections which we will explain section by section.
Notes
Here you will find two variables. one you can change and one you should never touch.
Config Version: 1.8: this is the current version of the config file, please leave this be since we only change this when we make a change to the config file. When we change something in the config file you will receive a message in your console saying your config file is out of date and that you should update it (copying your current settings, deleting the file, restarting your server to create the newest version, and then changing the old settings back to your previous settings.
Language: en_US: This is the language selector. this doesn't influence the config file, but it will influence every other message in the plugin, including the game save files. Right now you can choose between 'en_US' (English), 'nl_NL' (Dutch), and 'fr_FR' (French). if you speak another language and you wish to translate the plugin to your language then please let us know!
The Written Code
The written code is about customizable texts. This section consists of three changeable variables. The first variable is written in JSON. In case you don't know how to use JSON format, here is a tutorial.
Actionbar Message: This is the message displayed on the action bar (the message bar floating above the experience bar) when you're playing a game.
by default, this "WhackaMole your score is:" and will display your current score, so keep that in mind when replacing this message.
Hammer item: WhackaMole is played by using a so-called "Hammer". By default, this is a golden_axe, but you're able to change this into any Minecraft item from Minecraft version 1.19.2.
Hammer customModelData: To add more customizability to your hammer. This option can work with your resource pack to provide a different texture to the hammer. More info about customModelData here
Hammer itemDamage: Similar to the customModelData. This field is to add a damage value to the hammer so you can add a custom texture with the use of resource packs
Hammer Name: You can decide what the name is of the hammer item, this format supports hex colors and default Minecraft colors.
The economic side
This section is all about the financial situation of your server, what kind of bank system you use, what your currency is, and how expensive your reset tickets are.
Economy: this is the first thing to look at when you open your config file. this decides whether you use a vanilla scoreboard value system or if you make use of an economy plugin. you can either write SCOREBOARD or VAULT. no other options are allowed :)
- SCOREBOARD: this means you use a vanilla scoreboard system to keep track of the balance of players.
- VAULT: this means you make use of an economy plugin. there are multiple options for economy plugins, make sure your economy plugin uses Vault. Otherwise, the economy plugin won't be compatible with WhackaMole. Not sure whether your economy plugin is compatible? Here is a list of plugins that use Vault.
Scoreboard Objective: If you use Vault, you can ignore this variable. But, if you use a scoreboard system then you need to remove the single quotation marks and write down the name of your scoreboard objective where the points that the player wins when his/her game ends should be added to.
Singular Currency/Plural Currency: these are where you write down the name of your Currency, this will be used in the messages sent. at the singular, you write down the singular name of the currency (e.g. dollar). In the plural, you write down the plural usage of your currency (e.g. Dollars).
Currency Symbol: at this variable you write down which symbol you'd like to use to showcase your currency.
Ticket Price: the plugin has a command (/WAM buy) where players (with the correct permission) can buy tickets to reset the cooldown timer of a game. with this variable, you decide how much a reset ticket should cost.
Game options
this section is about multiple changes you can make to game structures. What sound should be played when hitting/missing a mole? Should the Game Config be a physical file or all in-game?
Game config: By default enabled. When you create a game, a bunch of properties will be generated for the game. we call these the Settings.
The settings are stored in SQLite but can also be generated into a file.
Now why would it be handy to have the settings as a file?
You can change settings in-game with the /WAM settings command, but let's say you need to change 5 settings at the same time. Then it is annoying to execute 5 separate commands for this. That's why you can have the settings also in the file. So you can edit the file, then simply reload the plugin (/WAM reload) and all the changed settings in the file will be loaded into the game.
Enabled Worlds: A server can contain multiple worlds, like for example: the overworld, the nether and the end. but with the use of other plugins, you can also have other worlds. This option allows you to decide in which worlds the plugin will work. By default, this is empty and all the worlds are enabled. If you only want one or two worlds to be active, then write them down underneath each other. WARNING: world names are case-sensitive.
HitSound: the sound that should be played when you hit a mole, to see which sounds you can use check this website.
MissedSound: the sound that should be played when you miss a mole, to see which sounds you can use check this website.
Blocklist: When you create a game (/WAM create) you need to stand on top of a "grid". This means it takes the block underneath you and takes all the blocks adjacent to the block you're standing on and if the (neighboring) block is within the Blocklist list, it'll be seen as a game block and added to the grid.
So in this list, you can add blocks that the game will accept as game blocks and will use as a block where moles can spawn.
Max playfield: as explained in the previous variable. The game works with a "Grid". To prevent accidentally killing the server with a massive grid. We have put a limit on the size of the grid. This means that if there are more blocks connected when making a game then the allowed number of blocks (Max playfield). The game won't be created.
with the Max playfield you can decide what the max size of a playfield should be.
Field extension: this variable has two options, width and height.
If the width is 1, then the player has to stand on top of the playfield to be able to play. We found that this can be annoying and so we introduced the width marge. By default, this is 1.4, which means that the player can be 1.4 blocks away from the edge of a game field (using absolute coords, if a block is at x=1 and z=1. The player will be able to stand within the range of x=-0.6 and x=2.4, and ditto for the z).
The same goes for the height. is this is set to 1, then the player has to stand max 1 block above the grid, which is again seen from 0 (so the bottom of the block). If the height is 1 and the player jumps, the player would exit the height marge and thus exit the game. By default, this is set to 2.5, so the player can safely jump and not exit the game (if your players have jump-boost, it is recommended to increase the height marge.
Permission nodes
This section is about naming the permissions used by the plugin. This can be handy when you have plugins that use similar permissions. then you can change the names of these permissions so they won't interfere with other permissions.
This part is divided into two sections.
Play: these are the permissions that regard the actual gameplay.
Use Reset Ticketis the permission players need to be able to use a reset ticket.Playis the permission that allows players to start a game and become a game player. Without this permission, players won't be able to start a game.
Commands: These permissions allow the usage of commands.
| Setting | Command | Explaination |
|---|---|---|
Buy |
/WAM buy |
Allows a player to buy reset tickets |
Settings |
/WAM settings |
Allows a player to see and change the settings of a game |
Reload |
/WAM reload |
Allows a player to reload the plugin (handy when you change something in the config or a game config file). |
Create |
/WAM create |
Allows a player to create games |
Remove |
/WAM remove |
Allows a player to remove games |
Positions |
/WAM positions |
Allows a player to set three different kinds of positions:1. the high score hologram2. the teleport location for when a game is already active3. the streak hologram(these are better explained in the commands page of this wiki). |
Top |
/WAM top |
Allows a player to see the top scores of a game per category |
Start |
/WAM start |
Allows a player to force start a game when a player is on the grid |
Stop |
/WAM stop |
Allows a player to force stop an ongoing game |
NOTE: whenever you use permission, make sure to add "Wam." in the front of it (e.g. the name for the Buy command is "Buy", then the permission to give the player is "Wam.Buy").
Language Files
In the WhackaMole folder you can find a folder called locales.
In this folder you find all the languages currently supported by the plugin and in these files you can edit any message to your liking.
The only important note, is that you can move around parameters (e.g. {score} or {Parameter}) in the same message, but not add or delete parameters. These are hardcoded into the messages and are replaced by other values.
Welcome to the end of this page. If you read this then it means you now know the config file by heart! Congratulations! Now that you know how the Config file works and have it all set up. It is time to dive into the next step: grid creation!