CraftLevel
2015 1/24 SPECIAL UPDATE!!!
FEATURES
This plugin add new crafting level system to your server.
Player can get craft experience by crafting items and level up to get more success craft rate.
All experience amount, all requirement experience for next level, increase success rate per one level and so on are configurable as you want.
I believe this plugin makes your server more enjoyable and challengeable.
Experience is set based on materials for craft and failure craft rate.
For example, in the case that you set 10 for STICK and 25 for WOOD.
WOOD_SWORD needs one stick and two woods so the total amount of experience is (10 + 25*2) = 60.
Then, multiply the failure rate(configurable) to 60.
If the success rate is 70%, the failure rate is 30%, so 60*0.3 = 18.
Finally, player gets 18 experience by crafting WOOD_SWORD.
If the craft failed(materials and craft item lost), player gets 18*0.7(success rate) = 12 experience.
This experience system means it's nonsense to get experience by crafting cheep items and facilitate get more challenge.
INSTALLATION
It's really easy to install this plugin to your server.
Download the latest version and put the downloaded JAR file into the "plugins/" folder of your Minecraft server.
This plugin is compatible with 1.8 and maybe more previous version.
Reload or start your server to get config file in "plugin/CraftLevel/".
Adjust the config.yml file as you want..
COMMANDS
- /cl status : display current craft level and craft exp
- /cl set level [PlayerName] [Amount] : set Player's level to [Amount]
- /cl set exp [PlayerName] [Amount] : set Player's exp to [Amount]
CONFIG
You can configure a lot of things as below.
- Default minimum craft success rate
- Default maximum craft success rate
- Increase success rate per level after requirement level
- Max craft level
- Backup rate
- Next level experience requirement
- Material config( require level , experience, options )
PERMISSION
- craftlevel.status : allow player to display current craft level and craft exp.
- craftlevel.set : allow player to /cl set [level or exp] command.
Metrics
This plugin utilizes Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
- You can disable the stat collection via /plugins/PluginMetrics/config.yml if you wish.
GitHub
https://github.com/dyukusi/Bukkit_plugins/tree/master/CraftLevel
TODO
- Shift key craft function
- Create Tutorial movie
- Support smelt (furnace) ( it's better to make "smelting level plugin"?)
- Support brewing(alchemy) ( it's better to make "brewing level plugin"?)
- Display CraftLevel status at side scoreboard( but you can get variables from CraftLevel class method)
- IMPROVEMENT OF MY AWFUL ENGLISH
Feel free to comment to improve this plugin.
@madtomic
I would also implement it if https://github.com/dyukusi/Bukkit_plugins/issues/22 is resolved.
any update coming? =)
You can add "/craftlevel add player amoumt" :)
@dyukusi
He does have a API for ScoreboardStats.
https://github.com/games647/ScoreboardStats
Another plugin Thirst was able to use API and added %Thirst% into scoreboardstats.
http://dev.bukkit.org/bukkit-plugins/byte-thirst/
@nexus671
I added option for that.
Now you can disable broadcast levelup notification.
Thank you for the comment.
@madtomic
Is it possible to support ScoreboardStats only by my working?
It seems there is no API for that.
@dyukusi
Ok, I forgot about this again. :) ScoreboardStats would be great for this to get the craft level info.
@nexus671
There is no option for this now.
CraftLevel/src/main/java/jp/mydns/dyukusi/craftlevel/task/GainExperience.java
Line 72 if you change plugin.getServer.broadcastMessage to player.sendMessage. Then only player who level would get the level message.
is there a way to make it so only the player sees that they leveled up?
@madtomic
Hmm... The cause of throwing error at reading ACASIA_DOOR_ITEM is your server is using old server version.
Please update your server to latest 1.8 server or remove all 1.8 items from config.yml file.
You can get variables such as craft level and craft exp from get_player_crafting_level_info() method of CraftLevel.jar.
However, I know it'll need a little technical knowledge about Java coding so I have a plan to display them in scoreboard.
I guess it's not compatible with other plugin using scoreboard though.
The best way is get them from the method and add them to your scoreboard if you can.
Thank you.
I forgot, I hope you added an option to turn off and turn on the scoreboard.
No enum constant org.bukkit.Material.ACACIA_ DOOR_ITEM
This is a bug I seen in many plugins for 1.7 and 1.8. I haven't figure it out why.
Latest build
You have two config files in jar btw.
[10:33:44 INFO]: [CraftLevel] Enabling CraftLevel v0.0.1 [10:33:44 WARN]: [CraftLevel] Default system encoding may have misread config.ym l from plugin jar [10:33:44 ERROR]: Error occurred while enabling CraftLevel v0.0.1 (Is it up to d ate?) java.lang.IllegalArgumentException: No enum constant org.bukkit.Material.ACACIA_ DOOR_ITEM at java.lang.Enum.valueOf(Unknown Source) [?:1.8.0_25] at org.bukkit.Material.valueOf(Material.java:64) [spigot1543.jar:git-Sp igot-1543] at jp.mydns.dyukusi.craftlevel.CraftLevel.decode_material_info_str(Craft Level.java:224) [?:?] at jp.mydns.dyukusi.craftlevel.CraftLevel.onEnable(CraftLevel.java:107) [?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:316) [s pigot1543.jar:git-Spigot-1543] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader .java:329) [spigot1543.jar:git-Spigot-1543] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage r.java:405) [spigot1543.jar:git-Spigot-1543] at org.bukkit.craftbukkit.v1_7_R3.CraftServer.loadPlugin(CraftServer.jav a:476) [spigot1543.jar:git-Spigot-1543] at org.bukkit.craftbukkit.v1_7_R3.CraftServer.enablePlugins(CraftServer. java:394) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.MinecraftServer.n(MinecraftServer.java:3 60) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.MinecraftServer.g(MinecraftServer.java:3 34) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.MinecraftServer.a(MinecraftServer.java:2 90) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.DedicatedServer.init(DedicatedServer.jav a:194) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java :458) [spigot1543.jar:git-Spigot-1543] at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6 28) [spigot1543.jar:git-Spigot-1543]
Special update Completed!
Now you can configure all display messages and options of materials.
Please replace old version to latest version and delete config file, then configure new config file.
You can configure in detail more than before version.
If you find bugs, please tell me about that.
Thank you for using the plugin.
@madtomic
Fixed.
Thank you.
You might want to add player don't exist yet. :)
[21:14:21 INFO]: soandso issued server command: /cl status playernotplayyet.
[21:14:21 ERROR]: null
org.bukkit.command.CommandException Unhandled exception executing command 'cl'
in plugin CraftLevel v0.0.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spi
got1543.jar:git-Spigot-1543]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
1) ~[spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe
r.java:767) ~[spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerCon
nection.java:1015 [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java
:845) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java
:28) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat
.java:65) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:184
) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java
:81) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:7
31) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
:490) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
28) [spigot1543.jar:git-Spigot-1543]
Caused by: java.lang.NullPointerException
at jp.mydns.dyukusi.craftlevel.CraftLevel.get_player_crafting_level_info
_contains(CraftLevel.java:186 ~[?:?]
at jp.mydns.dyukusi.craftlevel.command.BasicCommands.onCommand(BasicComm
ands.java:51 ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spi
got1543.jar:git-Spigot-1543]
... 13 more
@nashoxx
If you remove new 1.8 items from config.yml file, this'll work with previous version.
Yeah I have the plan to make furnace and brewing level plugin because my server need them for being more challenge.
i believe that all these
Support smelt (furnace) ( it's better to make "smelting level plugin"?) Support brewing(alchemy) ( it's better to make "brewing level plugin"?)
With the current crafting should go together.
WIll this work with 1.7.10?
@madtomic
Thank you for the report.
Fixed.
@dyukusi
The commands are not stable. Please check them. Thank you again! :)
Command Error:
[23:59:16 INFO]: soandso issued server command: /cl
[23:59:16 ERROR]: null
org.bukkit.command.CommandException Unhandled exception executing command 'cl'
in plugin CraftLevel v0.0.1
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spi
got1543.jar:git-Spigot-1543]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
1) ~[spigot1543.jar:git-Spigot-1543]
at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe
r.java:767) ~[spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerCon
nection.java:1015 [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java
:845) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java
:28) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat
.java:65) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:184
) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ServerConnection.c(ServerConnection.java
:81) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:7
31) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
84) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
:490) [spigot1543.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
28) [spigot1543.jar:git-Spigot-1543]
Caused by: java.lang.ArrayIndexOutOfBoundsException 0
at jp.mydns.dyukusi.craftlevel.command.BasicCommands.onCommand(BasicComm
ands.java:30 ~[?:?]
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[spi
got1543.jar:git-Spigot-1543]
... 13 more
@madtomic
I'm so glad to hear that. : P
Sorry for my really awful English skill.
I don't change messages for only English speaking people because I have made this plugin for Japanese users mainly.
So it seems better to provide message config file than change into your great English messages but i'll use them for default English message config file.
I guess it'll takes time for a while since I have a lot of other tasks.
Especially, researching in graduate school and job hunting. : q
If you can't wait, please clone from my GitHub and replace messages what you want.
Thank you for using the plugin.
If you have more suggestions, feel free to post.
@dyukusi
Very nice job. I am happy to see the new changes. Here are some more suggestions and small changes.
Grammar Change:
When player is trying to shift click craft.
Change <Sorry, Crafting with click is only usable from now.>
to <Sorry, shift crafting is disabled.> This is more understandable.
When player gain a crafting leve.
Change playername : Lv 8 -> 9
to Congratulation, you gain a crafting level. Your crafting level is now level 9.
For max crafting level.
message: Congratulation, you had reached the max crafting level. Your crafting level is now level 50.
Craft messages:
You succeeded to craft minecraft:item_name. The item_name is not correct everytime.
For example:
Craft a log like Oak Wood into Oak Wood Planks.
It says, <You succeeded to craft WOOD.>
I think this can be address in another way mabye against a list of Data values matching to the correct names?
example: Oak Wood Plank data value is 5
5 Oak Wood Planks
5:1 Spruce Wood Planks
5:2 Birch Wood Planks
5:3 Jungle Wood Planks
etc.
Maybe use data value to find the correct names?
If player are using Oak Wood (17) <You succeeded to craft Oak Wood Planks.> this is 5.
Here is a good reference for data values.
http://minecraft-ids.grahamedgecombe.com/