Portal Creation in Sponge

Hello,
i am an newbie in development of Mods / Plugins for Minecraft and i try to create an Portal with the //wand Command of WorldEdit.
I get the coordinates for the Portal in this form “(47.0, 71.0, 49.0) - (50.0, 74.0, 49,0)” as String or Region from the wand.

But i don’t know how I can set this as Portal.
Please give me a hint :smiley:

Greetings,
Marco

Wait is their already worldedit for sponge O.o?

Its an issue on github btw:

But if you can’t wait. I would say listen on a PlayerMoveEvent and check if the player is between these coordinates.

Thank you.
Ill try that.
There is one Build from worldedit for Forge that works under 1.8
https://github.com/sk89q/WorldEdit/tree/feature/forge1.8/worldedit-forge

I have an Problem with PlayerMoveEvent.
Every Event is registred in my MainClass but PlayerMoveEvent doesnt Work.
Any Idea why this get fired?

Did you:

  • registered the object
  • Used @subscribe above the event method

Also a gist with your code could be helpfully :smile:.

This is only a testcode at the moment, but why i should register the object? My class is on Main Class.
TIP from Docu:

For event handlers on your main plugin class, you do not need to register the object for events because Sponge will do it automatically.

 @Subscribe
 public void onPlayerMove(PlayerMoveEvent event) {
        Player player = event.getPlayer();
        String playername = player.getName();
        org.spongepowered.api.world.Location location = player.getLocation();
        player.sendMessage(Texts.builder(playername + " bewegt sich. (" + location.toString() + ")").color(TextColors.GREEN).build());
        getLogger().info(playername + " bewegt sich. (" + location.toString() + ")");

Ah it seems not implemented yet.

3 Likes

Yup. Not all events are implemented, yet. I was just testing a plugin last night, only to find that PlayerChatEvent wasn’t working, yet. :frowning:

1 Like