{"action":"created","issue":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/222","labels_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/222/comments","events_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/222/events","html_url":"https://github.com/SpongePowered/SpongeCommon/issues/222","id":112640154,"number":222,"title":"EventManager is inconsistent on allowing private/public Listeners","user":{"login":"Zidane","id":744482,"avatar_url":"https://avatars.githubusercontent.com/u/744482?v=3","gravatar_id":"","url":"https://api.github.com/users/Zidane","html_url":"https://github.com/Zidane","followers_url":"https://api.github.com/users/Zidane/followers","following_url":"https://api.github.com/users/Zidane/following{/other_user}","gists_url":"https://api.github.com/users/Zidane/gists{/gist_id}","starred_url":"https://api.github.com/users/Zidane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zidane/subscriptions","organizations_url":"https://api.github.com/users/Zidane/orgs","repos_url":"https://api.github.com/users/Zidane/repos","events_url":"https://api.github.com/users/Zidane/events{/privacy}","received_events_url":"https://api.github.com/users/Zidane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Aaron1011","id":1408859,"avatar_url":"https://avatars.githubusercontent.com/u/1408859?v=3","gravatar_id":"","url":"https://api.github.com/users/Aaron1011","html_url":"https://github.com/Aaron1011","followers_url":"https://api.github.com/users/Aaron1011/followers","following_url":"https://api.github.com/users/Aaron1011/following{/other_user}","gists_url":"https://api.github.com/users/Aaron1011/gists{/gist_id}","starred_url":"https://api.github.com/users/Aaron1011/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aaron1011/subscriptions","organizations_url":"https://api.github.com/users/Aaron1011/orgs","repos_url":"https://api.github.com/users/Aaron1011/repos","events_url":"https://api.github.com/users/Aaron1011/events{/privacy}","received_events_url":"https://api.github.com/users/Aaron1011/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-10-21T17:30:26Z","updated_at":"2015-10-21T17:51:41Z","closed_at":null,"body":"Reported originally by Feeliiix on IRC\r\n\r\nGiven the following plugin:\r\n\r\n```\r\npackage org.spongepowered.test;\r\n\r\nimport static org.spongepowered.api.text.Texts.of;\r\n\r\nimport com.google.inject.Inject;\r\nimport org.spongepowered.api.Game;\r\nimport org.spongepowered.api.block.BlockTypes;\r\nimport org.spongepowered.api.block.tileentity.carrier.Furnace;\r\nimport org.spongepowered.api.data.key.Keys;\r\nimport org.spongepowered.api.data.manipulator.mutable.tileentity.FurnaceData;\r\nimport org.spongepowered.api.entity.living.player.Player;\r\nimport org.spongepowered.api.event.Listener;\r\nimport org.spongepowered.api.event.block.InteractBlockEvent;\r\nimport org.spongepowered.api.event.game.state.GameInitializationEvent;\r\nimport org.spongepowered.api.plugin.Plugin;\r\nimport org.spongepowered.api.text.Text;\r\nimport org.spongepowered.api.text.Texts;\r\nimport org.spongepowered.api.text.format.TextColor;\r\nimport org.spongepowered.api.text.format.TextColors;\r\nimport org.spongepowered.api.util.command.CommandException;\r\nimport org.spongepowered.api.util.command.CommandResult;\r\nimport org.spongepowered.api.util.command.CommandSource;\r\nimport org.spongepowered.api.util.command.args.CommandContext;\r\nimport org.spongepowered.api.util.command.args.GenericArguments;\r\nimport org.spongepowered.api.util.command.spec.CommandExecutor;\r\nimport org.spongepowered.api.util.command.spec.CommandSpec;\r\n\r\n@Plugin(id = \"FurnaceDataTester\", name = \"A plugin to test the furnace data\", version = \"1.0\")\r\npublic class FurnaceTest {\r\n\r\n    @Inject\r\n    private Game game;\r\n\r\n    private FurnaceData furnaceData;\r\n\r\n    @Listener\r\n    private void onInit(GameInitializationEvent event) {\r\n        CommandSpec setCmd = CommandSpec\r\n                .builder()\r\n                .description(Texts.of(\"Set a custom data to a furnace\"))\r\n                .permission(\"spongetester.data.furnace.set\")\r\n                .arguments(GenericArguments.seq(\r\n                        GenericArguments.onlyOne(GenericArguments.integer(of(\"passedBurnTime\"))),\r\n                        GenericArguments.onlyOne(GenericArguments.integer(of(\"maxBurnTime\"))),\r\n                        GenericArguments.onlyOne(GenericArguments.integer(of(\"passedCookTime\"))),\r\n                        GenericArguments.onlyOne(GenericArguments.integer(of(\"maxCookTime\")))\r\n                ))\r\n                .executor(new SetCommand())\r\n                .build();\r\n\r\n        CommandSpec furnaceDataCmd = CommandSpec\r\n                .builder()\r\n                .description(Texts.of(\"Manipulates the data of a furnace\"))\r\n                .permission(\"spongetester.data.furnace.*\")\r\n                .child(setCmd, \"set\", \"s\")\r\n                .build();\r\n\r\n        this.game.getCommandDispatcher().register(this, furnaceDataCmd, \"furnaceData\", \"furnace\", \"fd\");\r\n    }\r\n\r\n    @Listener\r\n    public void onInteract(InteractBlockEvent.Primary event) {\r\n        event.getCause().first(Player.class).get().sendMessage(of(\"Test\"));\r\n        if (event.getTargetBlock().getState().getType() == BlockTypes.FURNACE\r\n                || event.getTargetBlock().getState().getType() == BlockTypes.LIT_FURNACE) {\r\n            if (furnaceData != null) {\r\n                Furnace furnace = (Furnace) event.getTargetBlock().getLocation().get().getTileEntity().get();\r\n                furnace.offer(furnaceData);\r\n                sendMessage(\"The data has changed!\", TextColors.DARK_GREEN, event.getCause().first(Player.class).get());\r\n                furnaceData = null;\r\n            }\r\n        }\r\n    }\r\n\r\n    private class SetCommand implements CommandExecutor {\r\n\r\n        @Override\r\n        public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {\r\n            if (!(src instanceof Player)) {\r\n                throw new CommandException(Texts.of(TextColors.RED, \"This command is only meant for players!\"));\r\n            }\r\n\r\n            final int passedBurnTime = args.<Integer>getOne(\"passedBurnTime\").get();\r\n            final int maxBurnTime = args.<Integer>getOne(\"maxBurnTime\").get();\r\n            final int passedCookTime = args.<Integer>getOne(\"passedCookTime\").get();\r\n            final int maxCookTime = args.<Integer>getOne(\"maxBurnTime\").get();\r\n            final FurnaceData furnaceData = FurnaceTest.this.game.getRegistry().getManipulatorRegistry().getBuilder(FurnaceData.class).get().create();\r\n\r\n            furnaceData.set(Keys.PASSED_BURN_TIME, passedBurnTime);\r\n            furnaceData.set(Keys.MAX_BURN_TIME, maxBurnTime);\r\n            furnaceData.set(Keys.PASSED_COOK_TIME, passedCookTime);\r\n            furnaceData.set(Keys.MAX_COOK_TIME, maxCookTime);\r\n\r\n            FurnaceTest.this.furnaceData = furnaceData;\r\n            FurnaceTest.this.sendMessage(\"Click on a furnace to change the data!\", TextColors.GREEN, (Player) src);\r\n\r\n            return CommandResult.success();\r\n        }\r\n    }\r\n\r\n    private void sendMessage(String message, TextColor textColor, Player player) {\r\n        Text border = Texts.builder().color(TextColors.GRAY).append(of(\"┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫\")).build();\r\n        Text custom = Texts.builder().color(textColor).append(of(message)).build();\r\n        player.sendMessage(border);\r\n        player.sendMessage(custom);\r\n        player.sendMessage(border);\r\n    }\r\n}\r\n```\r\n\r\nBoth listeners are baked and fired yet GameInit is private. If I make interact private, it doesn't get fired. @Aaron1011 you are getting assigned to this."},"comment":{"url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/comments/149976122","html_url":"https://github.com/SpongePowered/SpongeCommon/issues/222#issuecomment-149976122","issue_url":"https://api.github.com/repos/SpongePowered/SpongeCommon/issues/222","id":149976122,"user":{"login":"Zidane","id":744482,"avatar_url":"https://avatars.githubusercontent.com/u/744482?v=3","gravatar_id":"","url":"https://api.github.com/users/Zidane","html_url":"https://github.com/Zidane","followers_url":"https://api.github.com/users/Zidane/followers","following_url":"https://api.github.com/users/Zidane/following{/other_user}","gists_url":"https://api.github.com/users/Zidane/gists{/gist_id}","starred_url":"https://api.github.com/users/Zidane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zidane/subscriptions","organizations_url":"https://api.github.com/users/Zidane/orgs","repos_url":"https://api.github.com/users/Zidane/repos","events_url":"https://api.github.com/users/Zidane/events{/privacy}","received_events_url":"https://api.github.com/users/Zidane/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T17:51:41Z","updated_at":"2015-10-21T17:51:41Z","body":"@simon816 \r\n\r\nThe point is, its working currently when the listener above is clearly PRIVATE. This is a bug."}}