Give new/old players an item once

This guide will help you setup an event file that gives your players an ei item once upon join whether they're new or players who have at least joined your server once

DEPENDENCIES

- PlaceholderAPI

- Changeoutput Expansion (PAPI)

STEPS

1) Create a new SCore variable

This will be used to check if the player has received the item or not. We will be using this variable name for this tutorial only. It can be a different name but it must not have a "_" symbol and again, we will be using "playerjoin" as our variable name in this tutorial.

2) Set the type to NUMBER

3) Set the for to PLAYER

4) Save and exit

5) Create an event

Again, the name of the EE can be anything but we will be using "event-playerjoin" in this tutorial

6) Go to activators and create a new activator

7) Create a PLAYER_CONNECTION activator

We will be using PLAYER_CONNECTION not PLAYER_FIRST_CONNECTION to deal with players who have joined your server already

8) Go to placeholder conditions and create a new placeholder condition

9) Setup the following values

This checks if the score variable's value is 1. IF it's 1, it will return "yes", otherwise it will return "no"

10) Save

11) Add the commands

12) Save and Exit

Now you're done!

Config:

editorIcon: LEVER
name: '&eDefault name'
disabledWorlds: []
activators:
  activator0:
    name: '&eActivator'
    option: PLAYER_CONNECTION
    cancelEvent: false
    silenceOutput: false
    cooldownOptions:
      cooldown: 0
      isCooldownInTicks: false
      cooldownMsg: '&cYou are in cooldown ! &7(&e%time_H%&6H &e%time_M%&6M &e%time_S%&6S&7)'
      displayCooldownMessage: true
      cancelEventIfInCooldown: false
    globalCooldownOptions:
      cooldown: 0
      isCooldownInTicks: false
      cooldownMsg: '&cYou are in cooldown ! &7(&e%time_H%&6H &e%time_M%&6M &e%time_S%&6S&7)'
      displayCooldownMessage: true
      cancelEventIfInCooldown: false
    requiredItems: {}
    requiredExecutableItems: {}
    worldConditions: {}
    playerConditions: {}
    commands:
    - score variables set player playerjoin 1 %player%
    - ei give %player% kickback 1
    placeholdersConditions:
      plchCdt0:
        type: PLAYER_STRING
        comparator: EQUALS
        part1: '%changeoutput_=_input:{score_variables_playerjoin}_matcher:1_ifmatch:yes_else:no%'
        part2: 'no'
        cancelEventIfNotValid: false
        messageIfNotValid: ''
        messageIfNotValidForTarget: ''

Last updated