Individual Signs

Sign

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 static method InSigns.sendSignChange(Player player, Sign sign) - Sends a SignUpdate-Packet to the specified player. Useful if you want to update certain signs periodically.
  • 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, String originalLine) {
                return player.getName();
            }
        };
        System.out.println("Plugin 'InSigns' found. Using it now.");
    } else {
        System.out.println("Plugin 'InSigns' not found. Additional sign features disabled.");
    }
}


Plugins using InSigns

Let me know if your plugin uses InSigns and you want to be mentioned here.

Notice

This plugin uses Hidendra's Metrics class to report usage stats to mcstats.org. This can be disable by setting 'metrics-stats' to false in the config.

Donations

If you like this plugin, consider supporting its development by making a donation.
Thanks in advance!

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of frizzbee30 frizzbee30 May 15, 2016 at 08:43 UTC - 0 likes

    @blablubbabc: Go

    Works great, don't even need to redo the signs :D Thanks

    KB Craft multiworld server
    Website http://kbcraftgaming.enjin.com/home
    Members blog site and file share
    http://kbcraftgaming.com
    Server play.kbcraftgaming.com

    New players are always given a warm welcome!

  • Avatar of blablubbabc blablubbabc May 15, 2016 at 01:35 UTC - 1 like

    IndividualSigns v2.4

    • Updated to MC 1.9.4: The sign contents need to additionally get replaced inside the chunk data packets now.

    This requires the latest version of ProtocolLib (4.0.0-SNAPSHOT currently), and does not work on versions below 1.9.4
    If you run into any issues, let me know.

  • Avatar of frizzbee30 frizzbee30 Mar 12, 2016 at 08:43 UTC - 0 likes

    This is actually a rather neat little plugin, it doesn't require exclusive use of the sign like other plugins. We really really like it! :D

  • Avatar of blablubbabc blablubbabc Nov 02, 2015 at 02:29 UTC - 1 like

    @punnydoge: Go

    You better ask the author of ScoreboardStats what placeholders he is using together with IndividualSigns, but from looking at the source code you could try [Kill], [Death], [KDR], [Streak] and [Mob].

  • Avatar of punnydoge punnydoge Nov 02, 2015 at 02:12 UTC - 0 likes

    I know I'm gonna feel like a real derp for asking this, but how do I make signs with these placeholders work right? I installed this, and the newest Scoreboardstats, but I could only get [PLAYER] to work. I tried things like %online% and %money%. Thanks.

  • Avatar of Duffa13 Duffa13 Apr 16, 2015 at 11:06 UTC - 0 likes

    @blablubbabc: Go

    Thank you very much this fixed the issue!

  • Avatar of blablubbabc blablubbabc Apr 15, 2015 at 14:36 UTC - 0 likes

    @Duffa13: Go

    Try the latest from here: http://www.spigotmc.org/resources/protocollib.1997/

    It's a continuation of ProtocolLib, updated to 1.8(.3)

  • Avatar of Duffa13 Duffa13 Apr 15, 2015 at 13:51 UTC - 0 likes

    @blablubbabc: Go

    This is the error message it is giving http://pastebin.com/EPfhkdNg I am using the latest stable build of Protocol Lib

    Last edited Apr 15, 2015 by Duffa13: updated pastebin
  • Avatar of blablubbabc blablubbabc Apr 11, 2015 at 11:51 UTC - 0 likes

    @Duffa13: Go

    It's working fine for me on 1.8.3

    Make sure your version of ProtocolLib is up to date.

  • Avatar of Duffa13 Duffa13 Apr 11, 2015 at 06:20 UTC - 0 likes

    Any update coming for Spigot 1.8.3?

Facts

Date created
Sep 18, 2012
Category
Last update
May 15, 2016
Development stage
Release
Language
  • deDE
  • enUS
License
All Rights Reserved
Curse link
Individual Signs
Reverse relationships
2
Downloads
20,757
Recent files

Authors

Relationships

Required dependency
ProtocolLib