{"action":"created","issue":{"url":"https://api.github.com/repos/5zig/The-5zig-API/issues/3","repository_url":"https://api.github.com/repos/5zig/The-5zig-API","labels_url":"https://api.github.com/repos/5zig/The-5zig-API/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/5zig/The-5zig-API/issues/3/comments","events_url":"https://api.github.com/repos/5zig/The-5zig-API/issues/3/events","html_url":"https://github.com/5zig/The-5zig-API/issues/3","id":215260980,"number":3,"title":"How to update module item every time an action bar message is received?","user":{"login":"theonlygusti","id":10684786,"avatar_url":"https://avatars2.githubusercontent.com/u/10684786?v=3","gravatar_id":"","url":"https://api.github.com/users/theonlygusti","html_url":"https://github.com/theonlygusti","followers_url":"https://api.github.com/users/theonlygusti/followers","following_url":"https://api.github.com/users/theonlygusti/following{/other_user}","gists_url":"https://api.github.com/users/theonlygusti/gists{/gist_id}","starred_url":"https://api.github.com/users/theonlygusti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theonlygusti/subscriptions","organizations_url":"https://api.github.com/users/theonlygusti/orgs","repos_url":"https://api.github.com/users/theonlygusti/repos","events_url":"https://api.github.com/users/theonlygusti/events{/privacy}","received_events_url":"https://api.github.com/users/theonlygusti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-03-19T12:33:22Z","updated_at":"2017-03-23T11:32:18Z","closed_at":null,"body":"From the example plugin provided and the source code I can't figure out how to do this."},"comment":{"url":"https://api.github.com/repos/5zig/The-5zig-API/issues/comments/288691273","html_url":"https://github.com/5zig/The-5zig-API/issues/3#issuecomment-288691273","issue_url":"https://api.github.com/repos/5zig/The-5zig-API/issues/3","id":288691273,"user":{"login":"theonlygusti","id":10684786,"avatar_url":"https://avatars2.githubusercontent.com/u/10684786?v=3","gravatar_id":"","url":"https://api.github.com/users/theonlygusti","html_url":"https://github.com/theonlygusti","followers_url":"https://api.github.com/users/theonlygusti/followers","following_url":"https://api.github.com/users/theonlygusti/following{/other_user}","gists_url":"https://api.github.com/users/theonlygusti/gists{/gist_id}","starred_url":"https://api.github.com/users/theonlygusti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theonlygusti/subscriptions","organizations_url":"https://api.github.com/users/theonlygusti/orgs","repos_url":"https://api.github.com/users/theonlygusti/repos","events_url":"https://api.github.com/users/theonlygusti/events{/privacy}","received_events_url":"https://api.github.com/users/theonlygusti/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T11:32:18Z","updated_at":"2017-03-23T11:32:18Z","body":"`MyModuleItem`:\r\n\r\n```java\r\npackage io.github.theonlygusti.fivezigaddons;\r\n\r\nimport eu.the5zig.mod.modules.GameModeItem;\r\n\r\npublic class MyModuleItem extends GameModeItem<MyServer.MainServer> {\r\n  public MyModuleItem() {\r\n    super(MyServer.MainServer.class);\r\n  }\r\n\r\n  @Override\r\n  protected Object getValue(boolean dummy) {\r\n    if (dummy) {\r\n      return \"Example Action Bar Message\";\r\n    } else {\r\n      return getGameMode().lastActionBarMessage;\r\n    }\r\n  }\r\n\r\n  @Override\r\n  public String getName() {\r\n    return \"AddOns\";\r\n  }\r\n}\r\n```\r\n\r\n`Main`\r\n\r\n```java\r\npackage io.github.theonlygusti.fivezigaddons;\r\n\r\nimport eu.the5zig.mod.The5zigAPI;\r\nimport eu.the5zig.mod.event.EventHandler;\r\nimport eu.the5zig.mod.event.LoadEvent;\r\nimport eu.the5zig.mod.modules.Category;\r\nimport eu.the5zig.mod.plugin.Plugin;\r\n\r\n@Plugin(name = \"AddOns\", version = \"1.0\")\r\npublic class Main {\r\n  @EventHandler(priority = EventHandler.Priority.LOW)\r\n  public void onLoad(LoadEvent event) {\r\n    The5zigAPI.getAPI().registerServerInstance(this, ServerInstanceHandler.class);\r\n    The5zigAPI.getAPI().registerModuleItem(this, \"AddOns\", MyModuleItem.class, Category.OTHER);\r\n  }\r\n}\r\n\r\n```"}}
{"actor":{"display_login":"theonlygusti"}}