Filled Player of the month

Discussion in 'Archived: Plugin Requests' started by XgXXSnipz, Jul 4, 2014.

  1. Offline

    XgXXSnipz

    Plugin category: Fun

    Suggested name: POTM

    What I want: Id like a plugin that you can vote for a player and at the end of the month(IRL) the player with the most votes gets 15 diamonds and the server broadcasts a message saying "The player of the month is [playername]" and the message is in green and the player name is in blue also a player can only vote once
    Ideas for commands: /player vote [playername]

    Ideas for permissions: POTM.use

    When I'd like it by: At least next week
     
  2. Offline

    izarooni

    Can a player only vote once per month or, once per player?
     
  3. Offline

    XgXXSnipz

    once per month
     
  4. Offline

    izarooni

    <Edit by Moderator: Redacted mediafire url>
    I tried to squish everything inside of the config.yml file. I hope that's ok. I barely got any errors testing it but that's just me. Players and other testers always find a way to mess something up. If you get an error, tell me and hopefully I'll be able to help solve it. :)
    <Edit by Moderator: Redacted mediafire url>
    Formatting codes

    You can change the item reward and amount in the config too. Keep the spelling as it is in the link below if you do change the item. I'm not sure if it has to be capitalized though.
    List of item names
     
    Last edited by a moderator: Nov 2, 2016
    EddieFriday likes this.
  5. Offline

    XgXXSnipz

    [quote uid=90646977 name="izarooni" post=2630170]<Edit by Moderator: Redacted mediafire url>
    I tried to squish everything inside of the config.yml file. I hope that's ok. I barely got any errors testing it but that's just me. Players and other testers always find a way to mess something up. If you get an error, tell me and hopefully I'll be able to help solve it. :)
    You can use colors and special effects in the broadcasted message using the & symbol. If you do use color codes (which I'm assuming you are) make sure you keep the apostrophe at the begging and end of the message. If you want the Player-of-The-Month's name in the message just put [playername] somewhere in the message, exactly like that.
    Formatting codes

    You can change the item reward and amount in the config too. Keep the spelling as it is in the link below if you do change the item. I'm not sure if it has to be capitalized though.
    List of item names[/quote]

    Awe, I get an error, when i try to vote it says an external error has occured
    Code:
    [11:44:33 INFO]: CreeperSwagg34[/127.0.0.1:51989] logged in with entity id 438 a
    t ([world] -247.03087235931915, 69.0, 254.04566683712358)
    [11:44:43 INFO]: CreeperSwagg34 issued server command: /potm vote CreeperSwagg34
     
    [11:44:43 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'potm
    ' in plugin PlayerOfTheMonth v1.0
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[cra
    ftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:18
    0) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at org.bukkit.craftbukkit.v1_7_R3.CraftServer.dispatchCommand(CraftServe
    r.java:701) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.PlayerConnection.handleCommand(PlayerCon
    nection.java:956) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java
    :817) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.PacketPlayInChat.a(PacketPlayInChat.java
    :28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.PacketPlayInChat.handle(PacketPlayInChat
    .java:47) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157
    ) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craf
    tbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:6
    67) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:2
    60) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:5
    58) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java
    :469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:6
    28) [craftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
    Caused by: java.lang.ClassCastException: [Lorg.bukkit.entity.Player; cannot be c
    ast to java.util.Collection
            at potm.main.Core.onCommand(Core.java:95) ~[?:?]
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[cra
    ftbukkit.jar:git-Bukkit-1.7.9-R0.2-1-ga6e0bfd-b3095jnks]
            ... 13 more
    >
    Im using 1.7.9-RO.3-SNAPShot
     
    Last edited by a moderator: Nov 2, 2016
  6. Offline

    Onlineids

    izarooni For some reason you tried to cast (Player) to a collection (Line 95)
     
  7. Offline

    XgXXSnipz

    Onlineids Can you fix the plugin for me?
     
  8. Offline

    Onlineids

    XgXXSnipz Just wait for izarooni I am sure he can fix the plugin now that he knows the error.
     
  9. Offline

    izarooni

  10. Offline

    backspace119

    How exactly did this error occur? It seems like something kinda really weird ( and definitely unrelated to the users version (and you shouldn't have left the api for this which is the only thing that can make it bukkit version dependant))

    Where and why did you cast a player to a collection?
     
  11. Offline

    XgXXSnipz

    [quote uid=90646977 name="izarooni" post=2630170]<Edit by Moderator: Redacted mediafire url>
    I tried to squish everything inside of the config.yml file. I hope that's ok. I barely got any errors testing it but that's just me. Players and other testers always find a way to mess something up. If you get an error, tell me and hopefully I'll be able to help solve it. :)
    You can use colors and special effects in the broadcasted message using the & symbol. If you do use color codes (which I'm assuming you are) make sure you keep the apostrophe at the begging and end of the message. If you want the Player-of-The-Month's name in the message just put [playername] somewhere in the message, exactly like that.
    Formatting codes

    You can change the item reward and amount in the config too. Keep the spelling as it is in the link below if you do change the item. I'm not sure if it has to be capitalized though.
    List of item names[/quote]

    Works, thanks a lot
     
    Last edited by a moderator: Nov 2, 2016
  12. Offline

    izarooni

    XgXXSnipz Give me a like? :DLikes are cool
     
  13. Offline

    xTigerRebornx

    backspace119 Onlineids Its a Player[], not a Player (hence the L before org.bukkit.entity.Player), and in the dev versions, the method he is calling now returns a Collection<Player> rather then a Player[]
     
  14. Offline

    EddieFriday

    izarooni there is a typo error?

    reward-colelcted:
     
  15. Offline

    izarooni

    Lol yeah I know :(
    I thought I updated the link, no?
     
  16. Offline

    backspace119

    Ah, didn't notice that. Although I've not really messed with the newest dev version much at all (in fact haven't really messed with bukkit recently) and I was unaware of this change, hence why my mind didn't go to the fact that that returns a collection now.

    my bad.
     
  17. Offline

    EddieFriday

    izarooni Just returns unknown command at my end.. I wonder why is this happening at my end?
     
  18. Offline

    izarooni

    EddieFriday hmm. That's weird. Are you 100% sure the plugin is in the right place?
     
  19. Offline

    EddieFriday

    izarooni LOL Kidding me? Yes man it is.

    When I fired /player vote <nameofplayer> the response will be "Unknown Comman. Type Help for HELP..."
     
  20. Offline

    izarooni

    EddieFriday lol I was just make sure. Maybe you have more than 1 server folder like I do since I play mini games and modded servers with friends.
    The command should be /potm vote <player name>
     
  21. Offline

    EddieFriday

    izarooni Oh i'm so sorry for my ignorance... I thought it was the proposed command from OP.. I'll try this asap..

    izarooni Can you have a config to let the server owner change the prefix of POTM and messages?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  22. Offline

    izarooni

  23. Offline

    EddieFriday

    izarooni

    Like: [POTM] yad yada yadaa messages.. If it is ok with you to have message.yml added to the config folder?
     
  24. Offline

    izarooni

    EddieFriday XgXXSnipz
    I added color customization. Just re-download from link above
    I hope I got most of the messages. Tell me if I missed some
     
  25. Offline

    EddieFriday

    izarooni Working great sir.. If I need additional feature can I tahg you here again?
     
  26. Offline

    izarooni

  27. Offline

    XgXXSnipz

    I need a feature that can speed up the time, like instead of having to wait a month i can do /potm speedup and it will jump a week, permission potm.speed also i need a feature that can add votes to a player permission: potm.vote.set
     
  28. Offline

    izarooni

    XgXXSnipz
    The only reason I can think of for speeding up the time is for testing purposes. It's not hard to just change your computer calendar 1 month ahead. And instead of adding a whole new command just to add votes to a player, you could go into the config go to a player node and edit his/her votes and reload using /potm reload
     
  29. Offline

    XgXXSnipz

    izarooni I also need a ability to see how many votes a player has
     
  30. Offline

    TheWolfBadger

    XgXXSnipz izarooni Another way you could do it izarooni is by counting every second in the config. You can take a look at my source for my upcoming plugin StaffTrials which uses this method. Source
     

Share This Page