{"action":"created","comment":{"url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/comments/54834980","id":54834980,"diff_hunk":"@@ -0,0 +1,84 @@\n+package net.buycraft.plugin.sponge;\n+\n+import lombok.RequiredArgsConstructor;\n+import net.buycraft.plugin.IBuycraftPlatform;\n+import net.buycraft.plugin.client.ApiClient;\n+import net.buycraft.plugin.data.QueuedPlayer;\n+import net.buycraft.plugin.execution.placeholder.PlaceholderManager;\n+import net.buycraft.plugin.execution.strategy.CommandExecutor;\n+import org.spongepowered.api.Sponge;\n+import org.spongepowered.api.entity.living.player.Player;\n+import org.spongepowered.api.item.ItemTypes;\n+\n+import java.util.Optional;\n+import java.util.UUID;\n+import java.util.concurrent.TimeUnit;\n+import java.util.logging.Level;\n+\n+/**\n+ * Created by meyerzinn on 2/14/16.\n+ */\n+@RequiredArgsConstructor\n+public class SpongeBuycraftPlatform implements IBuycraftPlatform {\n+\n+    private final BuycraftPlugin plugin;\n+\n+    @Override public String getName() {\n+        return \"sponge\";\n+    }\n+\n+    @Override public ApiClient getApiClient() {\n+        return plugin.getApiClient();\n+    }\n+\n+    @Override public PlaceholderManager getPlaceholderManager() {\n+        return plugin.getPlaceholderManager();\n+    }\n+\n+    @Override public void dispatchCommand(String command) {\n+        Sponge.getGame().getCommandManager().process(Sponge.getServer().getConsole().getCommandSource().get(), command);\n+    }\n+\n+    @Override public void executeAsync(Runnable runnable) {\n+        Sponge.getScheduler().createTaskBuilder().execute(runnable).async().submit(plugin);\n+    }\n+\n+    @Override public void executeAsyncLater(Runnable runnable, long time, TimeUnit unit) {\n+        Sponge.getScheduler().createTaskBuilder().execute(runnable).async().delay(time, unit).submit(plugin);\n+    }\n+\n+    @Override public void executeBlocking(Runnable runnable) {\n+        Sponge.getScheduler().createTaskBuilder().execute(runnable).submit(plugin);\n+    }\n+\n+    @Override public void executeBlockingLater(Runnable runnable, long time, TimeUnit unit) {\n+        Sponge.getScheduler().createTaskBuilder().execute(runnable).delay(time, unit).submit(plugin);\n+    }\n+\n+    @Override public boolean isPlayerOnline(QueuedPlayer player) {\n+        String uuidwd = player.getUuid().replaceFirst(\"(\\\\p{XDigit}{8})(\\\\p{XDigit}{4})(\\\\p{XDigit}{4})(\\\\p{XDigit}{4})(\\\\p{XDigit}+)\",","path":"sponge/src/main/java/net/buycraft/plugin/sponge/SpongeBuycraftPlatform.java","position":59,"original_position":59,"commit_id":"d8a1c90592982c3449af8f7e6eaf0acd445de76d","original_commit_id":"7d64483396428fe12d78caf9a81be60efa652e3b","user":{"login":"minecrafter","id":979956,"avatar_url":"https://avatars.githubusercontent.com/u/979956?v=3","gravatar_id":"","url":"https://api.github.com/users/minecrafter","html_url":"https://github.com/minecrafter","followers_url":"https://api.github.com/users/minecrafter/followers","following_url":"https://api.github.com/users/minecrafter/following{/other_user}","gists_url":"https://api.github.com/users/minecrafter/gists{/gist_id}","starred_url":"https://api.github.com/users/minecrafter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minecrafter/subscriptions","organizations_url":"https://api.github.com/users/minecrafter/orgs","repos_url":"https://api.github.com/users/minecrafter/repos","events_url":"https://api.github.com/users/minecrafter/events{/privacy}","received_events_url":"https://api.github.com/users/minecrafter/received_events","type":"User","site_admin":false},"body":"Does not take into account that `player.getUuid()` may be `null` - look at how the Bukkit port handles this.","created_at":"2016-03-03T04:27:27Z","updated_at":"2016-03-03T04:27:27Z","html_url":"https://github.com/BuycraftPlugin/BuycraftX/pull/19#discussion_r54834980","pull_request_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/comments/54834980"},"html":{"href":"https://github.com/BuycraftPlugin/BuycraftX/pull/19#discussion_r54834980"},"pull_request":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19","id":61508872,"html_url":"https://github.com/BuycraftPlugin/BuycraftX/pull/19","diff_url":"https://github.com/BuycraftPlugin/BuycraftX/pull/19.diff","patch_url":"https://github.com/BuycraftPlugin/BuycraftX/pull/19.patch","issue_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/19","number":19,"state":"open","locked":false,"title":"[WIP] Sponge Port","user":{"login":"20zinnm","id":6132034,"avatar_url":"https://avatars.githubusercontent.com/u/6132034?v=3","gravatar_id":"","url":"https://api.github.com/users/20zinnm","html_url":"https://github.com/20zinnm","followers_url":"https://api.github.com/users/20zinnm/followers","following_url":"https://api.github.com/users/20zinnm/following{/other_user}","gists_url":"https://api.github.com/users/20zinnm/gists{/gist_id}","starred_url":"https://api.github.com/users/20zinnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20zinnm/subscriptions","organizations_url":"https://api.github.com/users/20zinnm/orgs","repos_url":"https://api.github.com/users/20zinnm/repos","events_url":"https://api.github.com/users/20zinnm/events{/privacy}","received_events_url":"https://api.github.com/users/20zinnm/received_events","type":"User","site_admin":false},"body":"Things to do:\r\n- Test GUIs when that's implemented.\r\n- Finish implementing signs.\r\n- Overall tuneups.","created_at":"2016-03-03T04:20:54Z","updated_at":"2016-03-03T04:27:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e445c8d66b025f061d4fedf6f79a48584b833353","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19/commits","review_comments_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19/comments","review_comment_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/19/comments","statuses_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/statuses/d8a1c90592982c3449af8f7e6eaf0acd445de76d","head":{"label":"20zinnm:master","ref":"master","sha":"d8a1c90592982c3449af8f7e6eaf0acd445de76d","user":{"login":"20zinnm","id":6132034,"avatar_url":"https://avatars.githubusercontent.com/u/6132034?v=3","gravatar_id":"","url":"https://api.github.com/users/20zinnm","html_url":"https://github.com/20zinnm","followers_url":"https://api.github.com/users/20zinnm/followers","following_url":"https://api.github.com/users/20zinnm/following{/other_user}","gists_url":"https://api.github.com/users/20zinnm/gists{/gist_id}","starred_url":"https://api.github.com/users/20zinnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20zinnm/subscriptions","organizations_url":"https://api.github.com/users/20zinnm/orgs","repos_url":"https://api.github.com/users/20zinnm/repos","events_url":"https://api.github.com/users/20zinnm/events{/privacy}","received_events_url":"https://api.github.com/users/20zinnm/received_events","type":"User","site_admin":false},"repo":{"id":51812547,"name":"BuycraftX","full_name":"20zinnm/BuycraftX","owner":{"login":"20zinnm","id":6132034,"avatar_url":"https://avatars.githubusercontent.com/u/6132034?v=3","gravatar_id":"","url":"https://api.github.com/users/20zinnm","html_url":"https://github.com/20zinnm","followers_url":"https://api.github.com/users/20zinnm/followers","following_url":"https://api.github.com/users/20zinnm/following{/other_user}","gists_url":"https://api.github.com/users/20zinnm/gists{/gist_id}","starred_url":"https://api.github.com/users/20zinnm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/20zinnm/subscriptions","organizations_url":"https://api.github.com/users/20zinnm/orgs","repos_url":"https://api.github.com/users/20zinnm/repos","events_url":"https://api.github.com/users/20zinnm/events{/privacy}","received_events_url":"https://api.github.com/users/20zinnm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/20zinnm/BuycraftX","description":"The official Buycraft Plugin for a variety of Minecraft Server platforms.","fork":true,"url":"https://api.github.com/repos/20zinnm/BuycraftX","forks_url":"https://api.github.com/repos/20zinnm/BuycraftX/forks","keys_url":"https://api.github.com/repos/20zinnm/BuycraftX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/20zinnm/BuycraftX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/20zinnm/BuycraftX/teams","hooks_url":"https://api.github.com/repos/20zinnm/BuycraftX/hooks","issue_events_url":"https://api.github.com/repos/20zinnm/BuycraftX/issues/events{/number}","events_url":"https://api.github.com/repos/20zinnm/BuycraftX/events","assignees_url":"https://api.github.com/repos/20zinnm/BuycraftX/assignees{/user}","branches_url":"https://api.github.com/repos/20zinnm/BuycraftX/branches{/branch}","tags_url":"https://api.github.com/repos/20zinnm/BuycraftX/tags","blobs_url":"https://api.github.com/repos/20zinnm/BuycraftX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/20zinnm/BuycraftX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/20zinnm/BuycraftX/git/refs{/sha}","trees_url":"https://api.github.com/repos/20zinnm/BuycraftX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/20zinnm/BuycraftX/statuses/{sha}","languages_url":"https://api.github.com/repos/20zinnm/BuycraftX/languages","stargazers_url":"https://api.github.com/repos/20zinnm/BuycraftX/stargazers","contributors_url":"https://api.github.com/repos/20zinnm/BuycraftX/contributors","subscribers_url":"https://api.github.com/repos/20zinnm/BuycraftX/subscribers","subscription_url":"https://api.github.com/repos/20zinnm/BuycraftX/subscription","commits_url":"https://api.github.com/repos/20zinnm/BuycraftX/commits{/sha}","git_commits_url":"https://api.github.com/repos/20zinnm/BuycraftX/git/commits{/sha}","comments_url":"https://api.github.com/repos/20zinnm/BuycraftX/comments{/number}","issue_comment_url":"https://api.github.com/repos/20zinnm/BuycraftX/issues/comments{/number}","contents_url":"https://api.github.com/repos/20zinnm/BuycraftX/contents/{+path}","compare_url":"https://api.github.com/repos/20zinnm/BuycraftX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/20zinnm/BuycraftX/merges","archive_url":"https://api.github.com/repos/20zinnm/BuycraftX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/20zinnm/BuycraftX/downloads","issues_url":"https://api.github.com/repos/20zinnm/BuycraftX/issues{/number}","pulls_url":"https://api.github.com/repos/20zinnm/BuycraftX/pulls{/number}","milestones_url":"https://api.github.com/repos/20zinnm/BuycraftX/milestones{/number}","notifications_url":"https://api.github.com/repos/20zinnm/BuycraftX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/20zinnm/BuycraftX/labels{/name}","releases_url":"https://api.github.com/repos/20zinnm/BuycraftX/releases{/id}","deployments_url":"https://api.github.com/repos/20zinnm/BuycraftX/deployments","created_at":"2016-02-16T06:12:15Z","updated_at":"2016-02-16T06:12:16Z","pushed_at":"2016-03-03T04:25:18Z","git_url":"git://github.com/20zinnm/BuycraftX.git","ssh_url":"git@github.com:20zinnm/BuycraftX.git","clone_url":"https://github.com/20zinnm/BuycraftX.git","svn_url":"https://github.com/20zinnm/BuycraftX","homepage":"https://buycraft.net","size":303,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"BuycraftPlugin:master","ref":"master","sha":"4e62525913c94704a01353cb62b72d3309cdd894","user":{"login":"BuycraftPlugin","id":8268757,"avatar_url":"https://avatars.githubusercontent.com/u/8268757?v=3","gravatar_id":"","url":"https://api.github.com/users/BuycraftPlugin","html_url":"https://github.com/BuycraftPlugin","followers_url":"https://api.github.com/users/BuycraftPlugin/followers","following_url":"https://api.github.com/users/BuycraftPlugin/following{/other_user}","gists_url":"https://api.github.com/users/BuycraftPlugin/gists{/gist_id}","starred_url":"https://api.github.com/users/BuycraftPlugin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuycraftPlugin/subscriptions","organizations_url":"https://api.github.com/users/BuycraftPlugin/orgs","repos_url":"https://api.github.com/users/BuycraftPlugin/repos","events_url":"https://api.github.com/users/BuycraftPlugin/events{/privacy}","received_events_url":"https://api.github.com/users/BuycraftPlugin/received_events","type":"Organization","site_admin":false},"repo":{"id":46900323,"name":"BuycraftX","full_name":"BuycraftPlugin/BuycraftX","owner":{"login":"BuycraftPlugin","id":8268757,"avatar_url":"https://avatars.githubusercontent.com/u/8268757?v=3","gravatar_id":"","url":"https://api.github.com/users/BuycraftPlugin","html_url":"https://github.com/BuycraftPlugin","followers_url":"https://api.github.com/users/BuycraftPlugin/followers","following_url":"https://api.github.com/users/BuycraftPlugin/following{/other_user}","gists_url":"https://api.github.com/users/BuycraftPlugin/gists{/gist_id}","starred_url":"https://api.github.com/users/BuycraftPlugin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BuycraftPlugin/subscriptions","organizations_url":"https://api.github.com/users/BuycraftPlugin/orgs","repos_url":"https://api.github.com/users/BuycraftPlugin/repos","events_url":"https://api.github.com/users/BuycraftPlugin/events{/privacy}","received_events_url":"https://api.github.com/users/BuycraftPlugin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BuycraftPlugin/BuycraftX","description":"The official Buycraft Plugin for a variety of Minecraft Server platforms.","fork":false,"url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX","forks_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/forks","keys_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/teams","hooks_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/hooks","issue_events_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/events{/number}","events_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/events","assignees_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/assignees{/user}","branches_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/branches{/branch}","tags_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/tags","blobs_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/git/refs{/sha}","trees_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/statuses/{sha}","languages_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/languages","stargazers_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/stargazers","contributors_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/contributors","subscribers_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/subscribers","subscription_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/subscription","commits_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/commits{/sha}","git_commits_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/git/commits{/sha}","comments_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/comments{/number}","issue_comment_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/comments{/number}","contents_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/contents/{+path}","compare_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/merges","archive_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/downloads","issues_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues{/number}","pulls_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls{/number}","milestones_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/milestones{/number}","notifications_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/labels{/name}","releases_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/releases{/id}","deployments_url":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/deployments","created_at":"2015-11-26T02:52:18Z","updated_at":"2016-03-02T18:17:51Z","pushed_at":"2016-03-03T04:25:18Z","git_url":"git://github.com/BuycraftPlugin/BuycraftX.git","ssh_url":"git@github.com:BuycraftPlugin/BuycraftX.git","clone_url":"https://github.com/BuycraftPlugin/BuycraftX.git","svn_url":"https://github.com/BuycraftPlugin/BuycraftX","homepage":"https://buycraft.net","size":285,"stargazers_count":16,"watchers_count":16,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19"},"html":{"href":"https://github.com/BuycraftPlugin/BuycraftX/pull/19"},"issue":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/19"},"comments":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/BuycraftPlugin/BuycraftX/statuses/d8a1c90592982c3449af8f7e6eaf0acd445de76d"}}}}