GiftEvents
About
This plugin handles giving out gifts to players when they join on certain types of days:
- Their birthday if registered
- Their first played anniversary
- Arbitrary defined dates
For any event an announcement can optionally be made to all players. For instance, for their birthday you might configure a message letting everyone know its their birthday. Gifts can optionally be received after an event should the player miss logging on. You can configure any number of items to give to a player and each item can have any number of enchantments. Items are given when the player logs on.
Safeguards are in place to keep a player from changing their birthday to get additional gifts and to keep announcements from occurring too frequently. Even if the player changes their configured birthday to another date they will not receive another gift till the following year.
McStats
GiftEvents is using McStats to collect some data such as operating system, java version, Amount of players and some more.
You can learn more about it here.
You can disable it in the config file in the plugin directory.
Screenshot
Commands
- /birthday get - Gets a player's birthday if set
- /birthday set MM-dd - Sets the birthday for a player
- /anniversary - Gets a player's first play anniversary, the date when they first joined the server
- /events list - Lists all configured events and their dates
- /events info - Detailed info about an event, including which gifts are given
- /events give - Admin command to give the items from an event to a player
- /events reset - Admin command to reset the gift status of a player for an event
- /events reload - Reloads the events config file from disk
Configuration
The are a few options in the config file, but most modifications take place in the events file. Both contains plenty of comments and examples to help you get started configuring events.
When configuring items use either the Minecraft item id number or a name as it appears in the Bukkit Material class documentation. For enchantments you can again use a numerical enchantment id or the enchantment's name in the Bukkit Enchantment class documentation. In case of spawn eggs use 383 as ID and the entity ID as damage value. All entity types can be found in the official Minecraft wiki.
When testing a configuration use the "/events reload" command to check for errors without needing to restart the server.
Permissions
The permissions are very simple and allow you restrict access for certain users:
- giftevents.birthday - Default: true
- giftevents.anniversary - Default: true
- giftevents.events - Default: true
- giftevents.incremental - Default: true
- giftevents.admin - Default: false
@Ironic8b49
Thank you for the report. I am gonna fix that soon.
@Aubli
gift_on_first_join was set to true but I didn't want that option so I set it to false now, I tried to run /events list [player] got internal error so I re-downloaded the plugin in case i got a bad download and still get same error
[19:04:17] [Server thread/ERROR]: null org.bukkit.command.CommandException: Unhandled exception executing command 'events' in plugin GiftEvents v2.3 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at org.bukkit.craftbukkit.v1_8_R1.CraftServer.dispatchCommand(CraftServer.java:646) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.PlayerConnection.handleCommand(PlayerConnection.java:1115) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.PlayerConnection.a(PlayerConnection.java:950) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:26) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.PacketPlayInChat.a(PacketPlayInChat.java:53) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.PacketHandleTask.run(SourceFile:13) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_75] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_75] at net.minecraft.server.v1_8_R1.MinecraftServer.z(MinecraftServer.java:683) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.DedicatedServer.z(DedicatedServer.java:316) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.MinecraftServer.y(MinecraftServer.java:623) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at net.minecraft.server.v1_8_R1.MinecraftServer.run(MinecraftServer.java:526) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] at java.lang.Thread.run(Thread.java:745) [?:1.7.0_75] Caused by: java.lang.NullPointerException at com.github.omwah.giftevents.command.EventsListCommand.execute(EventsListCommand.java:61) [?:?] at giftevents.com.github.omwah.omcommands.CommandHandler.dispatch(CommandHandler.java:103) [?:?] at giftevents.com.github.omwah.omcommands.NestedCommandExecutor.onCommand(NestedCommandExecutor.java:72) [?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) [craftbukkit.jar:git-Spigot-d0d1d87-15e81cf] ... 14 more
@Ironic8b49
There is an option in the config file to enable or disable gift_on_first_join.
But even if enabled the player should only get it only once per year.
You can check with: /events list [PLAYER]
true means he has received the gift and the number means how many times the announcement was displayed.
Hope I could help you.
@Ironic8b49
I will see what i can do about it.
I have a first time player which told me they get 5 diamonds every time they log in on the same day they first joined. thought you said they would have to wait a year for the anniversary event to work.
@Ironic8b49
Yes. That is how it should work.
@Aubli
so their birthday goes by and they decide to change it to the next day of current date they would have to wait 366 days for the gift? if that is how it is and it works then I'm good with it.
@Dillzzzzz
um thanks? :)
@Ironic8b49
are color codes not working? I have never tested color codes in the messages. If they aren't working I will add something.
The description says:
"Safeguards are in place to keep a player from changing their birthday to get additional gifts [...]. Even if the player changes their configured birthday to another date they will not receive another gift till the following year."
I haven't tested it but it should work as described.
this is so cute.
Added Thanksgiving and 4th of July, would be nice to be able to use color codes in the messages. Also an idea for the anniversary to give a diamond for every year they were playing on sever.. Also discovered that a player could spam their birthday by changing the date.
@Ironic8b49
Yes. You have to enter them in the events.yml file. An instruction and examples are in the file or can be read here.
As soon as the new version is approved you can get it.
seems to be working in Spigot 1.8, but will update when the new version comes out, to add events I have to manually enter them?
@Ironic8b49
I will publish an updated version in the next days. Stay tuned.
is this broken for Spigot 1.8? I would love to have a plugin like this on my server
@sparts
Hi sparts,
You mean that the player is able to run a command because of an event?
I found no way to make custom fireworks without code changes, so it will take some days to add this.
You can add more items with a new line. For different names just use 'name: "The item name here" '.
Example:
bread-day:
date: 08-24
belated: False
gift:
items:
- { id: BREAD, amount: 2 , name: "Your Bread!" } # 2 breads named 'Your Bread!'
- { id: WHEAT, amount: 10, name: "The Wheat to make bread!" }
message: "Happy Bread Day %1$s, check your inventory for more bread!"
Hope i could help you.
I tried this plugin and it seems to run pretty well. I would really like to be able to run a command for the first time you log on during the event.
How do you add multiple items with different names? I would like to give more than one type of item, but they are all named the same. I can't figure out how to make custom fireworks. An example that I normally use is:
- 401 2 color:red,black fade:green,white type:star power:2
It gives you 2 red/black star fireworks that fades to green/white with power 2
@otterun
It's possible to gift spawn eggs. Just use 383 as the item id and the Entity-Ids as damage values. You can find all entities in this table.
Simple example for Skeletons:
Monster-Day:
date: 06-09
belated: False
gift:
items:
- { id: 383, damage: 51}
name: "Monster"
message: "Take that Egg."
About Age:
It's possible too, but only around several corners (Spawn entity manually and set its age).
Hello Guys, I am the new Maintainer of GiftEvents.
The next things i'll be working on are:
Aubli (Alex)
@otterun
It is probably not possible as written currently since they are entities and not items. But I would welcome anyone to take a crack at modifying the plugin to support it.