Sueta
CU

Custom Gold Apples

1.1

Create gold apples with custom potion effects

·Plugin

This plugin will allow the user to create golden apples that, when eaten, will give custom potion effects. All of this is done through the plugin configuration, and I have plans to make the apple creation do-able in game.

Configuration syntax:

EXAMPLE CONFIG FILE:
In the attached files section I have included an example config file.

After running the plugin is run at least once, it will create a config.yml. It is in this config file that you will create your custom apples (I recommend having notepad ++ to do this). You'll notice that there is already one custom golden apple created with the id "defaultapple". DO NOT DELETE OR ALTER THIS. This apple is to show you how you create other apples, and the plugin is designed so that if you try to get rid of that apple, it will simply create a new one. If you want to create a new apple simply copy and paste all of the text under and including "defaultapple" and paste it below. The parent parameter of your new apple is the item id. This is what you'll type into chat to get your apple. Please do not put any spaces in the id. If you do it will not work. Everything under this parent parameter is relatively self explanatory but, I will briefly explain all of the parameters.

Display Name:

name : the text the user will see when they scroll and hover over the apple this can include spaces and stuff
color : the color of this text

lore:

mainLore:

message : the description the user will see when they hover over the apple
color : the color of this description

eatMessage :

message : the message displayed in chat to the user when they eat the apple
color : the color of this message

effects:

whichEverEffect:

enable : If you want the player to receive the given effect when they eat this apple, set to true. Otherwise set to false.
time : the time you want the effect to last in seconds. It has come to my attention that other people use ticks for their plugins. I thought seconds was more intuitive, but if you want this changed let me know
mult i : the effect multiplier. 0 is considered default so for example speed multi set to 0 is speed 1. you can make this crazy high if you like but Minecraft only shows the roman numeral up to a certain amount, and my plugin only shows the roman numeral up to 9 in the lore.
l oreColor : the color of this effect in the lore. I find dark_purple works well.

Commands:

  • /ap help :lists all the commands
  • /ap list :lists all of the custom apple id's
  • /ap give <apple id> :gives the command sender one of the specified apple
  • /ap give <apple id> <amount> :gives the command sender the specified amount of the specified apple
  • Thought of a command that would be handy but, isn't listed here? Please let me know and I'll do my best to implement it if I think it will improve the user experience.

Permissions : Currently only sever operators can use the ap commands. If you want to be able to control this in pex let me know, and I'll look into figuring that out.

Possible problems:

  • most of the problems will occur when this plugin is not configured correctly so make sure you read the entirety of the configuration syntax.
  • COLORS: So far the amount of colors available are somewhat limited, so if you put a color that's not supported it will appear white. colors are specified using the English name for the color. If the color is more than one word use an under score ie) dark_purple.
  • Overall if an error is found the plugin SHOULDN'T spit java errors to the console, as I've done my best to handle exceptions. If it is for some reason spitting errors, please let me know when it does, and what the exact exception is.

Support:
You can reach me at: [email protected]

Some things to note:

  • I am brand new to plugin coding and although I have a passable amount of experience when it comes to coding Java, this is the first actual Minecraft plugin I've made.
  • This plugin is in it's very early stages, and I know that there are probably plenty of problems with it that I haven't found in debugging. With this being said you'll have to be patient with it.

Similar projects

Plugin →