Salary [EASY]

Discussion in 'Archived: Plugin Requests' started by PotatoTears, Dec 10, 2013.

  1. Offline

    PotatoTears

    Garris0n i gave myself salary.45 yes
     
  2. Offline

    Garris0n

    I meant just "salary." and nothing else.

    Also timtower you called .toString() on a string :p
     
  3. Offline

    timtower Administrator Administrator Moderator

  4. Offline

    PotatoTears

    timtower let me try it

    timtower
    [18:23:48] [Server thread/INFO]: Starting minecraft server version 1.7.2
    [18:23:48] [Server thread/INFO]: Loading properties
    [18:23:48] [Server thread/INFO]: Default game type: SURVIVAL
    [18:23:48] [Server thread/INFO]: Generating keypair
    [18:23:48] [Server thread/INFO]: Starting Minecraft server on *:25565
    [18:23:48] [Server thread/INFO]: This server is running CraftBukkit version git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks (MC: 1.7.2) (Implementing API version 1.7.2-R0.1-SNAPSHOT)
    [18:23:49] [Thread-7/INFO]: ----- Bukkit Auto Updater -----
    [18:23:49] [Thread-7/INFO]: It appears that you're running a Development Build, when you've specified in bukkit.yml that you prefer to run Recommended Builds.
    [18:23:49] [Thread-7/INFO]: If you would like to be kept informed about new Development Build releases, it is recommended that you change 'preferred-channel' in your bukkit.yml to 'dev'.
    [18:23:49] [Thread-7/INFO]: With that set, you will be told whenever a new version is available for download, so that you can always keep up to date and secure with the latest fixes.
    [18:23:49] [Thread-7/INFO]: If you would like to disable this warning, simply set 'suggest-channels' to false in bukkit.yml.
    [18:23:49] [Thread-7/INFO]: ----- ------------------- -----
    [18:23:49] [Server thread/INFO]: [PermissionsEx] sql backend registered!
    [18:23:49] [Server thread/INFO]: [PermissionsEx] file backend registered!
    [18:23:49] [Server thread/INFO]: [Death Notify] Loading Death Notify v1.0
    [18:23:49] [Server thread/INFO]: [WorldEdit] Loading WorldEdit v5.5.8-1.6.2
    [18:23:49] [Server thread/INFO]: [Shopkeepers] Loading Shopkeepers v1.16-beta
    [18:23:49] [Server thread/INFO]: [Blood] Loading Blood v1.3.2
    [18:23:49] [Server thread/INFO]: [CrackShot] Loading CrackShot v0.97.5
    [18:23:49] [Server thread/INFO]: [BossShop] Loading BossShop v1.6.6
    [18:23:49] [Server thread/INFO]: [Vault] Loading Vault v1.2.27-b349
    [18:23:49] [Server thread/INFO]: [Agenda] Loading Agenda v1.0
    [18:23:49] [Server thread/INFO]: [Multiverse-Core] Loading Multiverse-Core v2.5-b641
    [18:23:49] [Server thread/INFO]: [PermissionsEx] Loading PermissionsEx v1.20.4
    [18:23:49] [Server thread/INFO]: [PermissionsEx] Initializing file backend
    [18:23:49] [Server thread/INFO]: Permissions file successfully reloaded
    [18:23:49] [Server thread/INFO]: [NoAdventureBreak] Loading NoAdventureBreak v0.0.1
    [18:23:49] [Server thread/INFO]: [WorldGuard] Loading WorldGuard v5.8
    [18:23:49] [Server thread/INFO]: [SalaryLikeMe] Loading SalaryLikeMe v0.0.1
    [18:23:49] [Server thread/INFO]: [Essentials] Loading Essentials v2.12.1
    [18:23:49] [Server thread/INFO]: [CraftBook] Loading CraftBook v3.7-SNAPSHOT:3353-b49ea1a,master
    [18:23:49] [Server thread/INFO]: [EssentialsChat] Loading EssentialsChat v2.12.1
    [18:23:49] [Server thread/INFO]: [ScoreboardStats] Loading ScoreboardStats v0.5.9
    [18:23:49] [Server thread/INFO]: [ScoreboardStats] The Plugin isn't compatible with your craftbukkit version. It will now try to use Reflections
    [18:23:49] [Server thread/INFO]: [Vault] Enabling Vault v1.2.27-b349
    [18:23:49] [Server thread/INFO]: [Vault][Economy] Essentials Economy found: Waiting
    [18:23:49] [Server thread/INFO]: [Vault][Permission] PermissionsEx found: Waiting
    [18:23:49] [Server thread/INFO]: [Vault][Permission] SuperPermissions loaded as backup permission system.
    [18:23:49] [Server thread/INFO]: [Vault][Chat] PermissionsEx found: Waiting
    [18:23:49] [Server thread/INFO]: [Vault] Enabled Version 1.2.27-b349
    [18:23:49] [Server thread/INFO]: Preparing level "City"
    [18:23:49] [Server thread/INFO]: Preparing start region for level 0 (Seed: 3125557941417246149)
    [18:23:49] [Server thread/INFO]: [Death Notify] Enabling Death Notify v1.0
    [18:23:49] [Server thread/INFO]: [WorldEdit] Enabling WorldEdit v5.5.8-1.6.2
    [18:23:49] [Server thread/INFO]: WEPIF: Using the Bukkit Permissions API.
    [18:23:49] [Server thread/INFO]: [Shopkeepers] Enabling Shopkeepers v1.16-beta
    [18:23:49] [Server thread/INFO]: [Blood] Enabling Blood v1.3.2
    [18:23:49] [Server thread/INFO]: Blood v1.3.2 : Has been enabled
    [18:23:49] [Server thread/INFO]: [CrackShot] Enabling CrackShot v0.97.5
    [18:23:49] [Server thread/INFO]: [CrackShot] Gun-mode activated. Boop!
    [18:23:49] [Server thread/INFO]: [BossShop] Enabling BossShop v1.6.6
    [18:23:49] [Server thread/INFO]: [BossShop] Loading data...
    [18:23:49] [Server thread/INFO]: [BossShop] Loaded 2 Shops!
    [18:23:49] [Server thread/INFO]: [BossShop] Vault found.
    [18:23:49] [Server thread/INFO]: [Agenda] Enabling Agenda v1.0
    [18:23:49] [Server thread/INFO]: [Multiverse-Core] Enabling Multiverse-Core v2.5-b641
    [18:23:49] [Server thread/INFO]: [AllPay] - Version 10.0 - hooked into Essentials Economy for Multiverse-Core v2.5-b641
    [18:23:50] [Server thread/INFO]: [Multiverse-Core] 1 - World(s) loaded.
    [18:23:50] [Server thread/INFO]: [Multiverse-Core] Version 2.5-b641 (API v18) Enabled - By Rigby, fernferret, lithium3141 and main--
    [18:23:50] [Server thread/INFO]: [PermissionsEx] Enabling PermissionsEx v1.20.4
    [18:23:50] [Server thread/INFO]: WEPIF: PermissionsEx detected! Using PermissionsEx for permissions.
    [18:23:50] [Server thread/INFO]: [Vault][Permission] PermissionsEx hooked.
    [18:23:50] [Server thread/INFO]: [Vault][Chat] PermissionsEx_Chat hooked.
    [18:23:50] [Server thread/INFO]: [NoAdventureBreak] Enabling NoAdventureBreak v0.0.1
    [18:23:50] [Server thread/INFO]: [WorldGuard] Enabling WorldGuard v5.8
    [18:23:50] [Server thread/INFO]: [WorldGuard] (City) TNT ignition is PERMITTED.
    [18:23:50] [Server thread/INFO]: [WorldGuard] (City) Lighters are PERMITTED.
    [18:23:50] [Server thread/INFO]: [WorldGuard] (City) Lava fire is blocked.
    [18:23:50] [Server thread/INFO]: [WorldGuard] (City) All fire spread is disabled.
    [18:23:50] [Server thread/INFO]: [WorldGuard] Loaded configuration for world 'City'
    [18:23:50] [Server thread/INFO]: [WorldGuard] 0 regions loaded for 'City'
    [18:23:50] [Server thread/INFO]: [SalaryLikeMe] Enabling SalaryLikeMe v0.0.1
    [18:23:50] [Server thread/INFO]: [Essentials] Enabling Essentials v2.12.1
    [18:23:50] [Server thread/INFO]: [Vault][Economy] Essentials Economy hooked.
    [18:23:50] [Server thread/INFO]: Essentials: Using PermissionsEx based permissions.
    [18:23:50] [Server thread/INFO]: [CraftBook] Enabling CraftBook v3.7-SNAPSHOT:3353-b49ea1a,master
    [18:23:50] [Server thread/INFO]: [CraftBook] Loading persistant data from YAML!
    [18:23:51] [Server thread/INFO]: [CraftBook] CraftBook v3.7.14 is the latest version available, and the updatability of it is: NO_UPDATE. You currently have version CraftBook v3.7.14 installed.
    [18:23:51] [Server thread/INFO]: [CraftBook] 1 cauldron recipe(s) loaded
    [18:23:51] [Server thread/INFO]: [CraftBook] Successfully added 4 CommandItems!
    [18:23:51] [Server thread/INFO]: [CraftBook] Enumerating chunks for self-triggered components...
    [18:23:51] [Server thread/INFO]: [CraftBook] 625 chunk(s) for 1 world(s) processed (1ms elapsed)
    [18:23:51] [Server thread/INFO]: [EssentialsChat] Enabling EssentialsChat v2.12.1
    [18:23:51] [Server thread/INFO]: [ScoreboardStats] Enabling ScoreboardStats v0.5.9
    [18:23:51] [Server thread/INFO]: DataSourcePool [ScoreboardStats] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[250]
    [18:23:51] [Server thread/INFO]: DatabasePlatform name:ScoreboardStats platform:sqlite
    [18:23:51] [Server thread/INFO]: SubClassFactory parent ClassLoader [org.bukkit.plugin.java.PluginClassLoader]
    [18:23:51] [Server thread/INFO]: Entities enhanced[0] subclassed[1]
    [18:23:51] [Server thread/INFO]: Server permissions file permissions.yml is empty, ignoring it
    [18:23:52] [Server thread/INFO]: Done (2,592s)! For help, type "help" or "?"
    [18:24:00] [User Authenticator #1/INFO]: UUID of player Rividium is 99ca9392290941aea7958c5b180cff06
    [18:24:00] [Server thread/INFO]: Rividium[/127.0.0.1:52027] logged in with entity id 0 at ([City] 10.91654903144246, 56.0, -5.713758140183545)
    [18:24:01] [Server thread/INFO]: Rividium issued server command: /pl
    [18:24:04] [Netty IO #2/INFO]: Rividium: h
    [18:24:05] [Server thread/INFO]: Rividium issued server command: /op
    [18:24:06] [Server thread/WARN]: [WorldEdit] No compatible nms block class found.
    [18:24:09] [Server thread/INFO]: Rividium issued server command: /salary
    [18:24:09] [Server thread/INFO]: salary.45
    [18:24:09] [Server thread/ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'salary' in plugin SalaryLikeMe v0.0.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:192) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:542) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:930) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:812) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:651) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:541) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:453) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    at nl.timdebrouwer.salarylikeme.SalaryLikeMe.getMoney(SalaryLikeMe.java:52) ~[?:?]
    at nl.timdebrouwer.salarylikeme.SalaryLikeMe.onCommand(SalaryLikeMe.java:77) ~[?:?]
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.6.4-R2.0-38-g4b4e2cc-b2953jnks]
    ... 13 more
    [18:24:15] [Server thread/INFO]: Rividium lost connection: Disconnected
    [18:24:15] [Server thread/INFO]: Rividium left the game.
    [18:24:23] [Server thread/INFO]: CONSOLE: Stopping the server..
    [18:24:23] [Server thread/INFO]: Stopping server
    [18:24:23] [Server thread/INFO]: [ScoreboardStats] Disabling ScoreboardStats v0.5.9
    [18:24:23] [Server thread/INFO]: [EssentialsChat] Disabling EssentialsChat v2.12.1
    [18:24:23] [Server thread/INFO]: [CraftBook] Disabling CraftBook v3.7-SNAPSHOT:3353-b49ea1a,master
    [18:24:23] [Server thread/INFO]: [CraftBook] Saving persistant data to YAML!
    [18:24:23] [Server thread/INFO]: [Essentials] Disabling Essentials v2.12.1
    [18:24:23] [Server thread/INFO]: [Vault][Economy] Essentials Economy unhooked.
    [18:24:23] [Server thread/INFO]: [SalaryLikeMe] Disabling SalaryLikeMe v0.0.1
    [18:24:23] [Server thread/INFO]: [WorldGuard] Disabling WorldGuard v5.8
    [18:24:23] [Server thread/INFO]: [NoAdventureBreak] Disabling NoAdventureBreak v0.0.1
    [18:24:23] [Server thread/INFO]: [PermissionsEx] Disabling PermissionsEx v1.20.4
    [18:24:23] [Server thread/INFO]: WEPIF: PermissionsEx detected! Using PermissionsEx for permissions.
    [18:24:23] [Server thread/INFO]: [Vault][Permission] PermissionsEx un-hooked.
    [18:24:23] [Server thread/INFO]: [Vault][Chat] PermissionsEx_Chat un-hooked.
    [18:24:23] [Server thread/INFO]: Permissions file successfully reloaded
    [18:24:23] [Server thread/INFO]: [Multiverse-Core] Disabling Multiverse-Core v2.5-b641
    [18:24:23] [Server thread/INFO]: [Agenda] Disabling Agenda v1.0
    [18:24:23] [Server thread/INFO]: [Vault] Disabling Vault v1.2.27-b349
    [18:24:23] [Server thread/INFO]: [BossShop] Disabling BossShop v1.6.6
    [18:24:23] [Server thread/INFO]: [BossShop] Disabling... bye!
    [18:24:23] [Server thread/INFO]: [CrackShot] Disabling CrackShot v0.97.5
    [18:24:23] [Server thread/INFO]: [Blood] Disabling Blood v1.3.2
    [18:24:23] [Server thread/INFO]: [Shopkeepers] Disabling Shopkeepers v1.16-beta
    [18:24:23] [Server thread/INFO]: [WorldEdit] Disabling WorldEdit v5.5.8-1.6.2
    [18:24:23] [Server thread/INFO]: [Death Notify] Disabling Death Notify v1.0
    [18:24:23] [Server thread/INFO]: Saving players
    [18:24:23] [Server thread/INFO]: Saving worlds
    [18:24:23] [Server thread/INFO]: Saving chunks for level 'City'/Overworld
    [18:24:23] [Thread-4/INFO]: Stopping server
    [18:24:23] [Thread-4/INFO]: Saving players
    [18:24:23] [Thread-4/INFO]: Saving worlds
     
  5. If you mean the code I gave, I wrote it on my phone, so I figured getPermission() would return Permission, not the permission as string, so I just added a toString() to make sure.

    timtower
    That might be the problem, Permission probably has a getName() method, so use that instead of toString() if necessary.
     
  6. Offline

    timtower Administrator Administrator Moderator

    Think that I need to do some testing myself
     
  7. Offline

    PotatoTears

    timtower likes this.
  8. Offline

    timtower Administrator Administrator Moderator

  9. Offline

    PotatoTears

    timtower I will test it asap!

    EDIT: it works! Oh wait one thing doesn't: The config keeps resetting itsself so i cannot change it, can you fix?
    Oh and Is there a way to display your salary in the scoreboard? I want a scoreboard that has a configurable text like &a&lStats and then &9Money: <vaultmoney> and &9Salary: <salary>
    The colors and text is configurable in the config and everyone has this scoreboard. Could you make this?
     
  10. Offline

    timtower Administrator Administrator Moderator

    Make sure to edit your config when the server isn't running. And I won't implement the scoreboard, bad experience with it.
    If somebody else is willing to add that, then notify me.
     
    AndyMcB1 likes this.
  11. Offline

    PotatoTears

    timtower I am editing the config while the server isnt running. Still resets. U gotta fix that. Oh and this thread will now be waiting for someone to make the scoreboard - anyone interested type here and quote timtower
     
  12. Offline

    timtower Administrator Administrator Moderator

    I don't have that issue. So I can't fix anything.
     
  13. Offline

    PotatoTears

    timtower Weird.

    timtower I'm trying to make my config like this:

    moneyMessage: '&c[Salary] &a%money%'
    message: '&c[Salary] &aPayday! You received %money%.'
    time: 120
    But it just resets... what may the problem?

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

    timtower Administrator Administrator Moderator

    Could you provide the startup log?
     
  15. Offline

    AndyMcB1

    It's a bit unfair to timtower that you've only brought this up now. He spent time coding what you originally wanted, because he was able to but since now he cannot (or doesn't want to) implement a new feature someone else will have to redo his work.
     
  16. Offline

    PotatoTears

    AndyMcB1 No timtower said that he's going to give a person the source code so he could continue the work.
    Oh and the config no longer resets when i added the quotes around message :D
     
  17. Offline

    timtower Administrator Administrator Moderator

    Good
     
  18. Offline

    PotatoTears

    timtower Can you give me the source code of SalaryLikeMe?
     
  19. Offline

    timtower Administrator Administrator Moderator

    Try decompiling it
     
  20. Offline

    PotatoTears

    Alright i still need a volunteer to do an addition to your plugin, timtower.

    What i need is, take timtower's salary plugin and make a scoreboard plugin that supports it. The scoreboard will have a config where you can set how the scoreboard looks like. The scoreboard would display your economy money (vault) and your current salary. As the scoreboard title, it will show your PermissionsEx rank. The Pex rank would display like this: <the rank's prefix><rank's name>
     
  21. Offline

    Desle

    I could try
     
  22. Offline

    PotatoTears

  23. Offline

    Desle


    Scoreboard has to constantly show..?

    EDIT: Okay.. nevermind, coding with the code of timtower is more difficult than i thought, since i'm still that nooby coder that can maybe do alot of things in his plugins, but.. it's just that i haven't discovered more advanced things, which makes my code always longer & makes me not understanding timtower's code.
     
  24. Offline

    PotatoTears

    Desle Yes scoreboard has to constantly show. You can do it ;)

    Desle Oh, and instead of the title being your current rank's prefix and the rank's name, make it like that:

    Each rank has a configurable title.
    So for example if you put this in config:

    Title_Ranks:
    Civilian:
    permission: title.civilian
    title: &4Civilian

    Now, if you give a rank the title.civilian permission, then whoever is that rank gets &4Civilian as their scoreboard title.

    Thank you. This is good.

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

    timtower Administrator Administrator Moderator

    PotatoTears
    And btw: You are asking for a completely different plugin now you know that?
     
  26. Offline

    PotatoTears

    timtower Yeah but i want the scoreboard to display the salary too. I hope someone will do this.
     
  27. Offline

    timtower Administrator Administrator Moderator

    Still, you are also asking to show ranks on it... That is kinda odd
     

Share This Page