[Abandoned] Spongy - A Very Spongy, Essential Plugin! v0.4

Alrighty, do you know when a newer version of the mod will be out to support the newer version of sponge?

Are you using 0.4? I’ve been working sign colorcoding for a while and that seems to be the culprit.

Yeah, and ahh I see

when will /home be added

That’s a planned feature, it’ll be out in a bit.

just as a rule of thumb, if your code looks like it has a lot of copy-pasted lines (even if they’re just minor edits like that), then there’s probably a better way of doing it. in this case, a for loop checking for the characters would suffice if in the situation where Texts.fromLegacy() isn’t a thing

3 Likes

That will make it so fex:

  • Hey im awsome & nice.

To:

  • Hey im awsome nice.

Understand?

Edit: or is it:

  • Hey im awsome § nice.
    I think it will be that
public enum ChatColor {
    WHITE('f'),
    YELLOW,('e'),
    GREEN('a');
    
    private char code;
    ChatColor(char code) {
        this.code = code;
    }

    public char getCode() {
        return code;
    }
}

public class CodeTest {
    public String parse(String form) {
        for(ChatColor color : ChatColor.values()) {
            form.replaceAll("&[" + color.getCode() + "]", "§" + color.getCode());
        }

        return form;
    }
}

regex exists. we can use that to prevent it, or you could also iterate slowly through all the letters of the given message and pick out which ones were color codes.

1 Like

oh, and there’s ^

1 Like

Sorry developments been pretty dead lately. School will be over for me soon, so it should pick back up.

WARNING CAUTION

/asConsole can be issued by non op players and they can use it to op themselfs, stop the server etc etc!!!

Just warning, I know @Lokio27 plans on implementing permissions, but until then any player can run this command.

Yup. That one I should of prioritized to have perms. School will be over in a while for me, so I’ll get on this.

Thanks, there are also errors on player joims/quits. I think I submitted em to github tho.

Don’t see those.

could be that the SpongeAPI was just updated and removed broadcastMessage(Text text).
Then replaced it with message sinks

Nah. It’s fixed now.

You’re overriding the /tp command. Could you also provide a version that acts exactly as the vanilla command when passedd coordinates? Cause it breaks redstone contraptions and makes it impossible to tp a player to specific coordinates or to change their rotation

2 Likes

Use /minecraft:tp instead.

So you want me to change every commandblock in a map to that? It breaks existing contraptions.

Well, /tp <player> | <x> <y> <z> [<rotx> <roty> <rotz>] will be an update I’ll do just cause :wink: