Portal Creation in Sponge

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:


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

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.

 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.


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