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:

ParamDescription
messageChat/actiobar/title message.
commandsRunning commands by the player or server
soundPlaying sound for the player
moneyGives any amount of money
fireworkLaunching 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

Action to execute commands on behalf of the player or console

Structure

ParamDescriptionValue type
playerCommands list. Specifies whether run a command by consoleList of String
consoleCommands list. Specifies whether run a command by playerList 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

ParamDescriptionDefaultValue type
powerThe distance the fireworks will fly. power = 0 ~ 4-5 blocks0Integer
effectsEffects listRandomList 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

ParamDescriptionDefault valueValue type
messagesList of messages displaying in the chat. That's how it looks inString
titleTitle messageString
subTitleSubtitle messageString
actionbarActionbar messageString
fadeInTitle fade in period in ticks (1 second = 20 ticks)10 (in ticks)Integer
fadeOutTitle fade out period in ticks10 (in ticks)Integer
stayDelay period before fade out starts in ticks30 (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

ParamDescriptionValue type
moneyThe amount of money to be handed outFloat 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

ParamDescriptionDefaultValue type
typeSound name. Here you can find all of them: Sound typesString
locationSound format playback location: "world,x,y,z"Player locationString
pitchThe pitch of the volume1.0Float
volumeHow loud the sound1.0Float

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>

Examples