Minecraft PC IP: play.cubecraft.net

MrTokay

Well-Known Member
Jul 4, 2016
585
441
138
Jon's house
www.cubecraft.net
So I wanted to suggest the possibility of adding a simple "/c" command to see the colors you can use a s Donator.
It would look something like:
Player: /c
Console: a b c d e f 1 2 3 4 5 6 7 8 9 0 l k (uh...) o n m

I thought this would be a pretty perfect Jr. Dev job: quick, easy, and useful.

@DanOF , @Mintcraftian

Just to help I tried to write the code for this: (not sure if its right because I haven't done Java in a looooonnngg time)
Code:
   }
        @Override
        public boolean onCommand (CommandSender sender, Command cmd, CommandLabel, String[] args)
    {
        if (commandLabel.equalsIgnorecase("Colors"))
            toggleColors (sender);
    
        return true;
    }
    private void toggle= Colors (CommandSender sender)
    {
        if ( !enabled((Player)sender) )
        {
            RankedUsers.add((Player) sender);
            ((Player) sender).sendMessage(ChatColor.BLUE + "a + ChatColor.GREEN + 2"   //etc.//);
        
        }
        else
        {
           RankedUsers.remove(Player) sender);
           (Player) sender).sendMessage (ChatColor.RED + "Only + ChatColor.GREY Iron + ChatColor.RESET + and above can use this");
        
        }
        public boolean enabled (Player player)
        {
             return ColorsUsers.contains(player);
        }
    
    }
Let me know what you think!



 
Last edited:
  • Like
Reactions: nEuro and hgbf

Buuuddy

Forum Expert
Mar 31, 2016
1,893
5,627
344
If you do "/colour f", for example, it says something like "You can only use 1 2 3 4 ...". It would be nice if the letters and nimbers would have the colour they represent.

I'm sorry for my crappy reply... I'm on my iPad so typing is hard :#
 

MagnificentSpam

Forum Expert
Mar 16, 2016
2,306
2,238
298
Might be useful sometimes, I have tabbed out of the game just to find some color code before.
But your code seems a bit strange to me, what does the ColorUsers list do?
Wouldn't that allow any user (not just ranks) to use the command, but only every second try?
Because I have a lot of work to avoid, I made this:
Code:
    private static String CHAT_COLOURS;
    static {
        CHAT_COLOURS_STRING = "";
        for (ChatColor colour: ChatColor.values()) {
            switch (colour) {
                case RESET:
                    break;
                case MAGIC:
                    CHAT_COLOURS_STRING = CHAT_COLOURS_STRING + colour + colour.getChar() + ChatColor.RESET + "(k) ";
                    break;
                default:
                    CHAT_COLOURS_STRING = CHAT_COLOURS_STRING + colour + colour.getChar() + ChatColor.RESET + " ";
            }
        }
    }

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("c")) {
            if (sender instanceof Player && !getRank((Player) sender).equals("Stone")) {
                sender.sendMessage(CHAT_COLOURS);
            } else {
                sender.sendMessage("Rank only feature ¯\\(ツ)/¯");
            }
            return true;
        }
        return false;
    }

    private static String getRank(Player player) {
        return "Diamond";
    }
 
Last edited:
  • Like
Reactions: FalseHonesty

Orangeric88

Forum Expert
Apr 22, 2016
5,121
2,054
283
Planet Orange
www.cubecraft.net
I like this idea since everytime I want to change a color I have to open up this thread and see what the colors are. But to this point, I think I memorized all of the number codes (eg. &1 Is blue \ &2 is green \ eg..) I'm still working on memorizing codes like &b (If you were wondering that's light blue.)
 

MrTokay

Well-Known Member
Jul 4, 2016
585
441
138
Jon's house
www.cubecraft.net
Might be useful sometimes, I have tabbed out of the game just to find some color code before.
But your code seems a bit strange to me, what does the ColorUsers list do?
Wouldn't that allow any user (not just ranks) to use the command, but only every second try?
Because I have a lot of work to avoid, I made this:
Code:
    private static final String CHAT_COLOURS = ChatColor.BLACK + "0 "
                                               + ChatColor.DARK_BLUE + "1 "
                                               + ChatColor.DARK_GREEN + "2 "
                                               + ChatColor.DARK_AQUA + "3 "
                                               + ChatColor.DARK_RED + "4 "
                                               + ChatColor.DARK_PURPLE + "5 "
                                               + ChatColor.GOLD + "6 "
                                               + ChatColor.GRAY + "7 "
                                               + ChatColor.DARK_GRAY + "8 "
                                               + ChatColor.BLUE + "9 "
                                               + ChatColor.GREEN + "a "
                                               + ChatColor.AQUA + "b "
                                               + ChatColor.RED + "c "
                                               + ChatColor.LIGHT_PURPLE + "d "
                                               + ChatColor.YELLOW + "e "
                                               + ChatColor.WHITE + "f "
                                               + "k(" + ChatColor.MAGIC + "k" + ChatColor.RESET + ") "
                                               + ChatColor.BOLD + "l " + ChatColor.RESET
                                               + ChatColor.STRIKETHROUGH + "m" + ChatColor.RESET + " "
                                               + ChatColor.UNDERLINE + "n" + ChatColor.RESET + " "
                                               + ChatColor.ITALIC + "o " + ChatColor.RESET;

    @Override
    public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
        if (cmd.getName().equalsIgnoreCase("c")) {
            if (sender instanceof Player && !getRank((Player) sender).equals("Stone")) {
                sender.sendMessage(CHAT_COLOURS);
            } else {
                sender.sendMessage("Rank only feature ¯\\(ツ)/¯");
            }
            return true;
        }
        return false;
    }

    private static String getRank(Player player) {
        return "Diamond";
    }

So I totally thought of the rank thing, just I figured, why can't everybody see this list?
There's no reason only ranks can see it.
 

Orangeric88

Forum Expert
Apr 22, 2016
5,121
2,054
283
Planet Orange
www.cubecraft.net
So I totally thought of the rank thing, just I figured, why can't everybody see this list?
There's no reason only ranks can see it.

For people without a rank, the color code think wont be much of a use. Considering they don't have access to colored chat or colored names that info would be useless to them. Sort of like you buy someone a $1000 computer but have no wifi :D
 

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,163
518
Kepler-452b
@Override
Nice idea!

I improved a little bit the code, but it was really fast and I didn't even added spaces (and didn't translated to color nodes :/)

Result = http://gph.is/2cbzMJq


Code:
package eu.hangar;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.ChatColor;

public class Colors extends JavaPlugin {
   
    public boolean onCommand (CommandSender sender, Command command, String commandLabel, String[] args){
       Player p = (Player) sender;
       if(commandLabel.equalsIgnoreCase("colors")){
        if(p.hasPermission("cubecraft.color")){
            p.sendMessage(ChatColor.GREEN + "a" + ChatColor.BLUE + "b" + ChatColor.RED +"c" + "etc");
        }else{
            p.sendMessage("You need to be" + ChatColor.GRAY + "Iron" +  ChatColor.RESET + "to use colors");
        }
       }
    return true;
       
       
    }
}
 
Last edited:

MrTokay

Well-Known Member
Jul 4, 2016
585
441
138
Jon's house
www.cubecraft.net
For people without a rank, the color code think wont be much of a use. Considering they don't have access to colored chat or colored names that info would be useless to them. Sort of like you buy someone a $1000 computer but have no wifi :D
Thats not a good example.
Its more like saying "I'm giving out $1000 PC's, but if you don't have WiFi i'm not giving it to you, because you can't use it". The people with no WiFi will probably want it anyway
 
  • Like
Reactions: MagnificentSpam

Orangeric88

Forum Expert
Apr 22, 2016
5,121
2,054
283
Planet Orange
www.cubecraft.net
Thats not a good example.
Its more like saying "I'm giving out $1000 PC's, but if you don't have WiFi i'm not giving it to you, because you can't use it". The people with no WiFi will probably want it anyway

True, but think more about it. A brand new computer with nothing on it. Won't it be useless to you? You can't watch videos, you can't download games, can't play minecraft, can't be on this forums talking you you right now :eek:(You need wifi) I mean the only thing you can do is watch and stare at the background. Or maybe play some games Microsoft gives you from the very beggining of the computer. But again after a while you'll be board of the games.

For the people that's wants it, a $1000 computer for free of course they will accept it. It's just a matter of will they use it everyday like a phone?

I'm relating this to the stones since even if they give they gave permissions to the stone to see the color codes, it won't be much of a use to them. (Since again they don't have access to colored chat and colored names. ;))

You could play offline games with a $1000 PC :)

EDIT: Very true, but the fact thing is the computer only has certain types of game that you can play without the internet. If your talking about offline games like "Temple Run" it won't work. You will need wifi to download the game I. The first place.
 

MrTokay

Well-Known Member
Jul 4, 2016
585
441
138
Jon's house
www.cubecraft.net
You're not listening to what I'm saying.
Nobody would refuse a $1000 PC/color commands unless they were losing something.
Since they're not over here, I don't see a reason not to give it to them,
 
Members Online

Latest profile posts

This is YOUR daily dose of facts #20-
More tornadoes occur in the United Kingdom per square mile than in any other country in the world.
TheOrderOfSapphire wrote on Capitan's profile.
Congratulations on hitting over 4 000 in Reaction Score! 💙
some people need to talk to their internet provider to buy them a gym membership because theyre too FAT to take knockback
Top Bottom