Sign colors in night

Discussion in 'Plugin Development' started by SkeletonGamer, Dec 11, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    SkeletonGamer

    Hi there,

    I would like to know how make this:
    [​IMG]

    I have already make colors in sign but not flashy colors in night. :D

    Thank you for your help guys ! :)
     
  2. Offline

    skipperguy12

    If you use regular colors at night, what does it do? Does it actually get dimmer and make the color unseeable?
     
  3. Offline

    SkeletonGamer

    Regular color at night look like that:
    [​IMG]
     
  4. Offline

    skipperguy12

    Use the reply feature please.

    Also, what plugin did you get the neon like colors in your first picture? Where was it from?
     
  5. Offline

    SkeletonGamer

  6. SkeletonGamer He describes it: All he does is replacing # with §, so he's using normal chat colors, no glowing magic... Maybe it just was like that in previous MC versions?
     
  7. Offline

    SkeletonGamer

    His old code:

    Code:
    package com.edwardhand.signColours;
     
    import com.nijiko.permissions.PermissionHandler;
    import org.bukkit.craftbukkit.entity.CraftPlayer;
    import org.bukkit.event.block.BlockListener;
    import org.bukkit.event.block.SignChangeEvent;
     
    public class SignListener extends BlockListener
    {
      private static SignColours parent;
     
      public SignListener(SignColours _parent)
      {
        parent = _parent;
      }
     
      public void onSignChange(SignChangeEvent e)
      {
        CraftPlayer player = (CraftPlayer)e.getPlayer();
        for (int i = 0; i < 4; i++)
        {
          if (e.getLine(i).isEmpty())
            continue;
          String[] splitLine = e.getLine(i).split("#");
          String newLine = splitLine[0];
          for (int j = 1; j < splitLine.length; j++)
          {
            int col;
            if ((splitLine[j].length() == 0) || ((col = "0123456789abcdef".indexOf(splitLine[j].toLowerCase().charAt(0))) == -1) || ((parent.permissionsEnabled) && (!checkPermissions(player, col))) || (splitLine[j].length() <= 1))
            {
              newLine = newLine + "#";
            }
            else
            {
              int col;
              newLine = newLine + "§";
            }
            newLine = newLine + splitLine[j];
          }
          e.setLine(i, newLine);
        }
      }
     
      private boolean checkPermissions(CraftPlayer _player, int _col)
      {
        PermissionHandler p = parent.permissions;
        char col = "0123456789abcdef".charAt(_col);
        return ((_col == 0) && (hasAnyPermission(_player))) || (p.has(_player, "signColours." + col)) || (p.has(_player, "signColors." + col)) || (p.has(_player, "signColours.*")) || (p.has(_player, "signColors.*"));
      }
     
      private boolean hasAnyPermission(CraftPlayer _player)
      {
        for (int i = 1; i <= 15; i++)
        {
          if (checkPermissions(_player, i))
          {
            return true;
          }
        }
        return false;
      }
    }
    I don't remember that colors has been glowing at night in old Minecraft versions...
     
  8. Offline

    TheTinySpider

    V10lator SkeletonGamer
    It's a picture from the old days, bright colors used to glow in the dark. They don't do that anymore due to the new light engine :(
     
Thread Status:
Not open for further replies.

Share This Page