ReMap
What is ReMap?
ReMap is a translation-plugin. It can translate itself, other plugins and even Bukkit into any language. WorldEdit in Norwegian? Swedish command names for WorldGuard? Profanity filters? Anything related to translations and replacements in the chat can be done using this plugin.
ReMap is currently in a beta-state, awaiting bug reports and feature requests.
In short - what can ReMap do?
- Translate any plugin into any language
- Add new command aliases to any existing commands
- Make a single command trigger multiple actions
- Modify any chat message sent by either players or the server itself
- Block commands
Dependencies?
ReMap depend on ProtocolLib to hook into chat messages sent by the server. It uses the PlayerCommandPreprocessEvent to translate commands. ProtocolLib is a "soft dependency", which means that ReMap will function without it, but swaps and bleeps will become disabled (learn what that means in the tutorial).
Basically, if you run ReMap without ProtocolLib, you can only use command-related features, like changing command names, adding aliases, auto-replies and such. ProtocolLib does not require any kind of setup. Just download it, and ReMap will put it to good use automatically.
How do I get ReMap up and running?
To get started quickly, head over to the quick start guide. To explore the full power of ReMap, read the detailed tutorial.
Does ReMap have any commands or permissions?
Yes, it does.
Commands
- /remap - Display this command list.
- /remap block - Toggle command blocking. When enabled, only remapped commands will work.
- /remap message - Change the message sent to players who are using a blocked command. Can be empty.
- /remap reload - Reloads configuration and translation files.
- /remap status - Display some stats.
Note: For safety reasons, "/remap block" can still be used when command blocking is enabled. However, it will act as if it's blocked if the client does not have permission to turn it off.
Permissions
ReMap accept commands from players with the "remap" permission node as well as server operators (OP).
How does ReMap handle permissions for remapped commands?
ReMap executes remapped commands as if they were executed by the player. If the player doesn't have permission, the usual permission-message for that command is displayed, if any.
Source code?
Visit GitHub.
Recent changes
This list only contains important stuff. For a more technical and complete list of changes for each version, please read the log attached to each file in the download section.
- ProtocolLib is now a "soft dependency". ReMap can function without it. Sort of.
- Words and phrases can now be removed, not just replaced.
Thank you so much!
Well, I didn't really. ProtocolLib is only needed to use swaps and bleeps, the stuff that alters chat messages. If you run ReMap without it, swaps and bleeps are simply turned off. You can still use remaps and replies, though.
As always, awesome! Thanks for this plugin. I wonder how you did it without ProtocolLib ? :D
Version 0.4 is now awaiting approval, and it should take care of this issue. To disable this particular message, you can use the same pattern, but remove the two double quotes on the right side of the colon, leaving that side empty.
Some other issues have also been fixed in this version, mostly technical stuff.
Hi, how can I disable message? I want to disable the [Console] Saving server... message. When I do like this:
It will print out this two characters : "". It is possible? Because I have my own backup system and it is pretty annoing to see this every frew minutes.
Version 0.3.3 is now awaiting approval. It's the same as the previous version, 0.3.2, but swaps should now work. In the 1.6 Bukkit update, the chat protocol changed, and this caused swaps to malfunction. I've also added a small patch that should ensure proper function in the future, as the chat protocol is expected to change again shortly.
I'm sorry for taking this long. The 1.6 update hit just as I was moving, so I've been offline for a while.
Please update for 1.6.1 the libraries and such
ReMap is awesome ! Thanks kiwhen ! Now, I can translate messages from WorldEdit, WorldGuard and Faction.
Thank you. It works.
ReMap ignores color codes when matching patterns. A red text saying "I'm sorry, ..." will match the pattern "I'm sorry, *". For matching patterns that contains colons, wrap the text in quotes. Like so: "Game ended. The winner is: Blue team" (include the quotes in the pattern). Single quotes can also be used.
There is currently no way to completely remove messages. The best it can do is to translate into a color code with no text, but that will still broadcast an empty line in the chat. Support will this will be added in the next update.
Can you help me? Because I can't translate messages with any ":". Like "Game ended. The winner is: Blue Team"
How do I remap colored messages? Like default bukkit "§cI'm sorry, but ..."
I also can't find a way to completly remove some messages. '' doesn't work.
Hello, thanks for the answer. I will improve it now. I do not need to compile by myself, I know how to download unapproved files. ( http://dev.bukkit.org/bukkit-mods/remap/files/5 ). Regards, craftik7
Both errors appear to be caused by the same problem. Even though "/" is not a valid command, it still triggers the command listener. A hotfix is currently awaiting approval, marked as version 0.3.2. The approval process seems to take a while, but it is possible to compile your own version using the source code available on GitHub - just remember to reference ProtocolLib as well as Bukkit.
The patterns you posted are very specific. They can be optimized by using the asterisk wildcard. Swap patterns must match 100%, so if you just type out a few words from the beginning of the message you want to match, it should work without much interference. (How often does plugins print messages that are almost identical to these?)
For example:
I'm sorry, but you do not have permission to perform this command. *
This pattern will match any message starting with the text above, followed by one or more words (like "Please contact the server administrators blah blah blah"). It's not only a shorter pattern, but ReMap will also spend much less time processing the pattern if it uses wildcards.
12:06:42 [SEVERE] Could not pass event PlayerCommandPreprocessEvent to ReMap v0.3
org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:427) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:462) at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(PlayerConnection.java:963) at net.minecraft.server.v1_5_R3.PlayerConnection.chat(PlayerConnection.java:889) at net.minecraft.server.v1_5_R3.PlayerConnection.a(PlayerConnection.java:846) at net.minecraft.server.v1_5_R3.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R3.NetworkManager.b(NetworkManager.java:292) at net.minecraft.server.v1_5_R3.PlayerConnection.d(PlayerConnection.java:115) at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R3.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:581) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 1 at java.lang.String.substring(String.java:1907) at com.kiwhen.remap.CmdListener.onPlayerCommandPreProcess(CmdListener.java:43) at sun.reflect.GeneratedMethodAccessor374.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:425) ... 16 more
my file:
Throwing a Exception if someone uses: "/"
http://pastebin.com/S8nPLkUi
@kiwhen
Thanks very much ! It worked
@craftik7
Hi! It seems that I will need to adjust the pattern search a bit. If you remove all the quotes and the period following the asterisk, it should work as expected.
If the output from Prism is something like this:
You can use these patterns:
At this time, the patterns are a bit jerky. I'll try to make this a bit more smooth in the next update.
Thank you very much! Awesome Edit: I cannot get Prismtranslating. This is my code. I really need to add two sentences that helps my players to operate:
Version 0.3 is now awaiting approval. Some major stuff has been added, multi-command support (like "BetterAlias") included. I've also updated the tutorials and such.
@craftik7
Thanks! I'll look into that right away.