Introduction
EasterEggs3.0
This plugin allows you to create easter eggs (blocks, entities, NPC). By clicking
them u can run various actions and events.
Installing
Copy the .jar file to your plugins folder. Run the server.
Now, go to the config.conf.
You will see the following:
database {
type: "MySQL"
host: "localhost"
database: "eastereggs"
port: 3306
user: "eastereggs"
password: "123123"
}
languageFile = "en"
To get help about the plugin type /ee help
.
Categories
You can create several easter egg categories and assign different access rights to them for users.
For example, you have two categories, one of which is accessible to player A and one of which is not.
The access to the category is configured through the permissions ee.type.<category_name>
To create a new category type /ee category create <category_name>
.
To delete any category type /ee category delete <category_name>
. If easter eggs from this category were already found by someone
they will be deleted from the database.
Create EasterEggs
Once you've created the group u can start editing it and adding new easter eggs by
typing /ee edit <category_name>
.
To add a new easter egg just click RMB on any block/armorstand/painting/frame/npc.
A new easter eggs with unique ID will be created.
To remove any easter egg just click LBM on it while editing.
Adding actions to easter eggs
Easter eggs actions are adding in edit mode. To add an action just type
/ee action add <easter_egg_id> <action_name> <action_data>
<action_name>
value is the name of one of the following action types:
Param | Description |
---|---|
message | Chat/actiobar/title message. |
commands | Running commands by the player or server |
sound | Playing sound for the player |
money | Gives any amount of money |
firework | Launching a firework |
Those actions are in the json format. Data depends on the variables of specified action.
Actions
Actions are what will be done when the egg is found
Here is a list of all available actions:
- Commands - command execution
- Firework - fireworks launch
- Message - displaying the message on the screen
- Money - disbursement of money
- Sound - sound payback
Commands
Action to execute commands on behalf of the player or console
Structure
Param | Description | Value type |
---|---|---|
player | Commands list. Specifies whether run a command by console | List of String |
console | Commands list. Specifies whether run a command by player | List of String |
Examples
Example json format:
{console:["Command 1", "Command 2"]}
Example command to add action:
/ee action add <egg_id> commands {player=["home", "say Hello"] console=["broadcast Hi!"]}
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
"0" {
location = "world, 0.0, 1.0, 0.0"
type = "BLOCK"
id = 0
actions {
commands {
player = [
"home",
"money"
]
console = "say hello!"
}
}
}
Message
The action that sets off the fireworks
Structure
Param | Description | Default | Value type |
---|---|---|---|
power | The distance the fireworks will fly. power = 0 ~ 4-5 blocks | 0 | Integer |
effects | Effects list | Random | List of String |
Colors for effects must be set in HEX. The number of effects is unlimited.
Examples
At the moment, this action can only be added via config.
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
"0" {
location = "world, 0.0, 0.0, 0.0"
type = "BLOCK"
id = 0;
actions {
firework {
power = 1
effects: [
{
type = BALL
trail = false
colors: [
"FF00FF",
"FF00FF",
"F000F0"
]
fadeColors: [
"000000",
"FF0000"
]
}
]
}
}
Message
Action to display text on the player's screen. This can be either a regular chat message to the player or an action bar & title with subtitle
Structure
Param | Description | Default value | Value type |
---|---|---|---|
messages | List of messages displaying in the chat. That's how it looks in | String | |
title | Title message | String | |
subTitle | Subtitle message | String | |
actionbar | Actionbar message | String | |
fadeIn | Title fade in period in ticks (1 second = 20 ticks) | 10 (in ticks) | Integer |
fadeOut | Title fade out period in ticks | 10 (in ticks) | Integer |
stay | Delay period before fade out starts in ticks | 30 (in ticks) | Integer |
fadeIn
, fadeOut
, stay
parameters only affect the following actionBar
, title
or subTitle
parameters
Examples
Example json format:
{messages:["Message 1", "Message 2"]}
For example, if u want to display something in actionbar, you should type:
/ee action add <egg_id> message {actionbar:"Hello, world!"}
or
/ee action add <egg_id> message {messages=["&eFirst", "&cSecond"]}
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
"0" {
location = "world, 0.0, 1.0, 0.0"
type = "BLOCK"
id = 0
actions {
message {
messages: [
"Hello world!",
"..."
]
title = "Title text"
subTitle = "subtitle text"
actionBar = "Actionbar text"
fadeIn = 10
stay = 40
fadeOut = 10
}
}
}
Money
Action to give money to a player
Structure
Param | Description | Value type |
---|---|---|
money | The amount of money to be handed out | Float or Integer |
Examples
At the moment, this action can only be added via config.
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
"0" {
location = "world, 0.0, 1.0, 0.0"
type = "BLOCK"
id = 0
actions {
money = 100
}
}
Sound
Action that plays the sound
Structure
Param | Description | Default | Value type |
---|---|---|---|
type | Sound name. Here you can find all of them: Sound types | String | |
location | Sound format playback location: "world,x,y,z" | Player location | String |
pitch | The pitch of the volume | 1.0 | Float |
volume | How loud the sound | 1.0 | Float |
Examples
Example json format:
{type="SOUND_TYPE_NAME" location="world,0,0,0"}
Command to add an action for an easter egg:
/ee action add <egg_id> sound {type="ENTITY_PLAYER_LEVELUP" location="world,0,60,-133"}
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
"0" {
location = "world, 0.0, 1.0, 0.0"
type = "BLOCK"
id = 0
actions {
sound {
type: "ENTITY_PLAYER_LEVELUP"
location: "world, -99.47, 4.0, -380.93"
}
}
}
Finish action
The action that sets off the fireworks
Example config
title = "Eggs Category"
hidePlayerData = false
category = "category2"
finishAction {
sound = "UI_TOAST_CHALLENGE_COMPLETE"
message {
title = "&aFinish!"
subtitle = "&eyou have found them all :)"
fadeIn = 10
fadeOut = 10
stay = 50
}
}
Placeholders
PlaceholderAPI support has been added to work with third-party plugins Available placeholders:
%ee_found_<name>%
- Number of found easter eggs in the group <name>
%ee_count_<name>%
- Total number of easter eggs in the group <name>