Individual Signs
Description
This plugin displays the text on signs for each player individual differently.
By default this plugin only replaces [PLAYER] on signs with the name and [DISPLAY] with the nick name of the player looking at it.
The permission nodes to create signs containing those tags are insigns.create.player and insigns.create.display.
However InSigns also includes an API for developers of other plugins to easily add own player-specific sign content.
This plugin could for example be used for individual greeting signs at your spawn. Your players will be amazed to see their own name on a sign!
IMPORTANT
This plugin needs ProtocolLib to work.
Make sure you have installed the right version of ProtocolLib.
This plugin should stay compatible with further versions of minecraft and bukkit as long as ProtocolLib doesn't have to change anything on it's API which InSigns is relying on, and the minecraft protocol isn't changing anything sign-related.
Quick Presentation by VariationVault
For plugin developers: easy-to-use API
Here is a small example of how you can use this in your own plugin to display player-specific values on signs.
1.) First of all: add the IndividualSigns jar to your build path (just like you do it with the bukkit.jar)
2.) You can then create a listener which listens for the SignSendEvent (just like you create listeners for bukkit events): This event gets called every time the server is about to update the sign contents for a player.
3.) The event provides easy methods to get the current sign text and to change it:
- getPlayer() - Gets the player which receives the sign packet.
- getLocation() - Gets the location of the sign which text is being sent.
- getLine(int index) - Gets the line of text at the specified index (0-3). The lines are in json format.
- setLine(int index, String line) - Sets the line of text at the specified index. Has to be in proper json format.
- isModified() - Whether or not this event was modified by some plugin.
- setCancelled(boolean cancelled) - If the event is cancelled the sign contents won't get updated for the affected player, leaving it at their current content (blank if all SignSendEvents get cancelled).
- isCancelled() - Checks whether or not some plugin cancelled this event already.
Example usage of the event to replace "[PLAYER]" with the player's name:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
public class SignSendListener implements Listener { public SignSendListener(Plugin plugin) { Bukkit.getServer().getPluginManager().registerEvents(this, plugin); } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onSignSend(SignSendEvent event) { for (int i = 0; i < 4; i++) { String line = event.getLine(i); if (line.contains("[PLAYER]")) { event.setLine(i, line.replace("[PLAYER]", event.getPlayer().getName())); } } } } |
That's it. The InSigns-Plugin will handle all the needed packet manipulation for you.
Some other useful utilities provided by InSigns are:
- The SimpleChanger class which can be used to easily create a listener for simple key->value replacements and permission checks during sign creation. Example for the built-in [PLAYER] -> playerName replacement:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
@Override public void onEnable() { Plugin insignsPlugin = getServer().getPluginManager().getPlugin("InSigns"); if ((insignsPlugin != null) && insignsPlugin.isEnabled()) { // Replaces "[PLAYER]" with the player's name on signs and checks for the 'insigns.create.player' permission whenever a player tries to create a sign with "[PLAYER]" on it new SimpleChanger(this, "[PLAYER]", "insigns.create.player") { @Override public String getValue(Player player, Location location) { return player.getName(); } }; getLogger().info("Plugin 'InSigns' found. Using it now."); } else { getLogger().info("Plugin 'InSigns' not found. Additional sign features disabled."); } } |
Plugins using InSigns
- Paintball War Edition - Offering individual paintball statistics signs.
- ScoreboardStats - Offering some individual general statistics signs.
Let me know if your plugin uses InSigns and you want to be mentioned here.
Statistics
This plugin uses bStats to collect anonymous usage statistics to determine the how many servers are using the plugin and with which minecraft versions it is used with the most. All collected information can be publicly viewed here: https://bstats.org/plugin/bukkit/InSigns
You can disable bStats for all plugins on your server by editing the file plugins/bStats/config.yml, or alternatively disable it only for IndividualSigns by setting 'metrics-stats' to 'false' inside InSigns' config.
Donations
If you like this plugin, consider supporting its development by making a donation.
Thanks in advance!
This is absolutely my favourite plugin, so I would love it to have a version compatible with 1.4.6 :S
This Plugin only works on version 1.4.5 R1.0 and below.
I hope the bukkit team will implement sign changes direclty into the bukkit api, so the use of not supported paket-modifying-methods wouldn't be necessary anymore for this plugin to work.
https:bukkit.atlassian.net/browse/BUKKIT-2544
I will do some experiments later, but for now don't expect an early version for 1.4.6 of this plugin.
it's not working on any other version than 1.4.5 R 1.0
Error with CB 1.4.6 R0.1 and InSigns 0.7
2012-12-21 11:08:46 [SEVERE] Could not load 'plugins/InSigns_v0.7.jar' in folder 'plugins' org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/minecraft/server/v1_4_5/NetServerHandler at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:184) at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305) at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230) at org.bukkit.craftbukkit.v1_4_6.CraftServer.loadPlugins(CraftServer.java:235) at org.bukkit.craftbukkit.v1_4_6.CraftServer.<init>(CraftServer.java:213) at net.minecraft.server.v1_4_6.PlayerList.<init>(PlayerList.java:52) at net.minecraft.server.v1_4_6.DedicatedPlayerList.<init>(SourceFile:11) at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.java:104) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:399) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_4_5/NetServerHandler at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173) ... 9 more Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_4_5.NetServerHandler at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:70) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 12 more
@BossSurvivalServer
wrong section
UPDATE PAINTBALL plz D:
@MrKrisKrisu
@ConquestServer
if it doesn't show up in /plugins there went something wrong with your "installing". Check maybe your server log for error ?
This is retarted, it doesn't work at all. I dropped this .jar file into my plugins, reloaded my server, then put up a sign and put [PLAYER] and it did absolutely NOTHING, just says [PLAYER]
What's wrong? And when i do /plugins it doesn't even fuckin show it, also in my plugins folder it doesn't create a folder for this plugin. And all i have in essentials and a few other little plugins like colored signs and citizens...
@buttatron2000
shouldn't conflict, as this plugin doesn't change the signs on the server, they are only displayed different.
@subanomic
I think I already implemented a method for that, but I am not sure right now. Edit: Yep. There is an method inside InSigns for that:
/**
sendSignChange(Player player, Sign sign);
Nice plugin!
It would be neat if it was possible (for plugin developers at least) to trigger a manual sign update. I want to display dynamic data that has to get updated at least once a minute.
this plugin does not work for me. i have a plugin that makes signs into commands. that might inflict i guess :/
@Sonicacraft
lign 6: "Permission to create a sign with "[PLAYER]" on it: insigns.create.player"
where are the permissions?
thx, installed it today.
Good work !
keine Ahnung :( noch nie tekkit benutzt.
Geht das auch mit Tekkit. Also mit der Bukkit API von 1.2.5 R4 ? Weil bei mir kommt immer ein Fehler, wenn ein Spieler joint.
Ouuh du kannst deutsch das ist gut denn wenn ich auf ein schild [PLAYER] schreibe steht da immer noch [PLAYER]
permissions zum seinen eigenen namen auf dem schild sehen oder zum [PLAYER] auf das schild schreiben?
Das mit [PLAYER] im chat find ich auch ne gute idee, werde ich mal schauen.
Könntest du Permissions und [PLAYER] für den chat adden? also damit jeder im chat seinen eigenen namen sieht
Danke Mfg