Filled CraftMan

Discussion in 'Plugin Requests' started by adi0115, Nov 11, 2017.

Thread Status:
Not open for further replies.
  1. Plugin category: MMORPG

    Minecraft version: 1.8.8

    Suggested name: CrafyMan

    What I want: If someone right clicks a specified item from the config on a crafting table, it will turn into another item with custom name and lore after specified time. If the player walks away more then 2 blocks from the crafting table, the converation will be cancalled and he will get back the original item. The plugin also cancels opening craft table even if they don't have the permissions.

    How items would be set up in a config:
    Code:
    stone_sword - gold_sword name:'&2Sword' lore:'&3GG' time:'200'
    Stone sword is the item that can be right clicked on the crafting table, when it is, it turns into a gold sword with the name &2Sword and lore &3GG. Time is the amount of time in ticks that will take for the player to get the gold sword. If someone right clicks a item on the crafting table that is not set up in the config, display a error message from the config

    Ideas for commands:
    - /cm relaod - reloads the config and messages

    Ideas for permissions:
    craftman.use - allows player to right click the crafting table, if they dont have it, display a message set in the config.

    When I'd like it by: Next week
     
    Last edited: Nov 14, 2017
  2. Offline

    RunsWithShovels

    I'll give this a try for you.
    Question, you said this should cancel opening a crafting table. Do you mean to cancel the crafting table only when someone right clicks it with an item, and to allow it to open when its an open hand? Or to cancel it all together.
     
  3. Cancel all together, they don't have a use on my server but if you want to, you can make that an option in the config incase someone actually uses them on their server but still wants to use this plugin from themselfs.
     
  4. Offline

    RunsWithShovels

    Alright then. Thanks for the reply. I'll be working on this for you.
     
  5. Offline

    RunsWithShovels

    @adi0115
    Sorry it took a while, there was a lot more to the coding that I had originally expected.

    permission to use is craftman.use
    permission to reload is craftman.reload

    command to reload the config and messages is cmreload

    The prevention method that implemented to keep a player from moving items while waiting on the item to covert is sort of screwy when you're in creative mode, though it works as expected in survival mode. Just wanted to throw that our there in case it was tested in the creative.

    The config file has an in depth description of what the fields are and how to change them.

    The messages file is fairly self-explanatory.
     

    Attached Files:

  6. @RunsWithShovels I attempted to try it out and I seem to get a error, I haven't edited anything, simply dropped the plugin onto my server and tried to use the stone sword to see how the plugin works.

    Error (open)
    Code:
    14.11 17:19:25 [Server] ERROR Could not pass event PlayerInteractEvent to CraftMan v1.0.0
    14.11 17:19:25 [Server] INFO org.bukkit.event.EventException
    14.11 17:19:25 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:228) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerInteractManager.interact(PlayerInteractManager.java:463) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:759) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:52) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.PacketPlayInBlockPlace.a(PacketPlayInBlockPlace.java:1) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_151]
    14.11 17:19:25 [Server] INFO at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_151]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
    14.11 17:19:25 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.inventory.EntityEquipment.getItemInMainHand()Lorg/bukkit/inventory/ItemStack;
    14.11 17:19:25 [Server] INFO at me.RunsWithShovels.craftman.Events.onRightClick(Events.java:48) ~[?:?]
    14.11 17:19:25 [Server] INFO at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source) ~[?:?]
    14.11 17:19:25 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_151]
    14.11 17:19:25 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_151]
    14.11 17:19:25 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-db6de12-18fbb24]
    14.11 17:19:25 [Server] INFO ... 17 more
     
    Last edited: Nov 14, 2017
  7. Offline

    RunsWithShovels

    @adi0115
    Sorry about that, I totally forgot that you was using it for a 1.8 server. I fixed the problem, and also added the messages for crafting being disabled.

    Also, I didn't place it in the config file, but the delay for each item is based off of seconds.
     

    Attached Files:

  8. Offline

    RunsWithShovels

    You're welcome

    Sent from my Nexus 6 using Tapatalk
     
Thread Status:
Not open for further replies.

Share This Page