[INACTIVE][CHAT] CookieWatch v0.3 - Change Your Chat/Display Name! (Permissions support) [670]

Discussion in 'Inactive/Unsupported Plugins' started by XxFuNxX, Mar 22, 2011.

  1. Offline

    XxFuNxX

    Cookie Watch - the simple Chat Name Changer!
    Version 0.3

    Thanks to Samkio for learning me some great stuff!

    Description: Change your chat name with a single command!


    Video Tutorial



    Yes this is a really basic plugin but, useful!
    Features:
    * CookieWatch sets your display name to what you want with a single command! (only your chat name gets changed NOT your real Minecraft name) (permissions support!!)

    Install:


    Go to your bukkit server folder/Plugins
    and paste Cookie Watch there!
    and just play! :)

    Permission Command:
    cw.command // makes the group be able to use Cookie Watch

    Command:
    CW <YourText> <---Sets The Chat Name To <YourText>
    Example: /CW Cookies
    Sets My Chat Name To Cookies

    To Reset Name:
    /CW <Anything> <---- Resets The Chat Name To Your Real <font color="rgb(255, 0, 255)">Minecraft </font>Name :)
    Example: /CW C <-- Resets My Name

    Note: in the log it will stand: [Name Change Enabled]//Cookie Watch
    but, i just did it that way!

    Bugs:
    * None so far! if there are any please tell me! :)

    Changelog:

    Version 0.3
    * Fixed with build 617
    * When you type a name, it will stand Name Chat Enable, Your name is now:<anything>

    Version 0.2

    * Added Permissions support

    Version 0.1

    * Releasing Cookie Watch

    Download Link: [<Edit by Moderator: Redacted mediafire url>



    To do:

    Show Spoiler
    Fix so your chat does not turn in to a color. Add <font color="rgb(255, 0, 0)">Color</font> and (Maybe) <font color="rgb(255, 0, 0)">Color</font> other (only Admins)
     
    Last edited by a moderator: Dec 14, 2016
  2. Offline

    ratty

    This is such a needed plugin!
    It needs permissions though, this would get abused so much.
     
  3. Offline

    XxFuNxX

    Hm, Yeah I (Think) I Will Add Permissions :) Thanks
     
  4. Offline

    QQCucumber

    Erm, not to be rude, but is there a reason you capitalized almost every word in the OP?
     
  5. Offline

    XxFuNxX

    What? I Dont Really Understund, you type /cw <anytexthere> to enable the plugin and /cw <anythin> to disable?
     
  6. Offline

    Adondriel

    This really needs permissions i would totally use this if there was permissions.
     
  7. Offline

    davr

    English lesson of the day: In general, only capitalize the first word of the sentence.

    Question: Why is this called Cookie Watch? I don't get what it has to do with cookies or with watches? :p
     
  8. Offline

    XxFuNxX

    Lol, i have my bad. ;)
    But permissions is a good idea i will (try) to add permissions.
    That with cookie, i have no idea why i called it "Cookie Watch". :)
    I like cookies! :p

    Good news! PERMISSIONS SUPPORT!!! :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 12, 2016
  9. Offline

    kahlilnc

    Add prefix and suffix to this please that would be really tight.
     
  10. Offline

    madcap

    I wrote a plugin some time ago that does this exact same thing:
    http://forums.bukkit.org/threads/4944/

    It includes a lot of features such as not allowing players to use a display name of actual players and allows you to set a blacklist of names that aren't allowed.
     
  11. Offline

    Arjan

    Hmm for now I don't think I'm going to use it, I know it has permissions but still.. It's to much power even for a SemiAdmin :p cause you can just name yourself to a other person (like there is some1 called Bob and another person names himself to Bob so he can like say stuff so the real Bob gets banned..) so yeah.. :D still love the idea though! Like naming myself God xD I will stop filling in your comment section now :p
     
  12. Offline

    madcap

    If you look at my version directly above your post, it doesn't allow you to use the names of other players. It also has a black-list of names. You could certainly put god on that blacklist.
     
  13. Offline

    Arjan

    wow i keep getting alerts even when i try to be nice wtf is it like a alert is good at the bukkit forums xd?
     
  14. I really like this, but, I'm using permissions and for groups I have colored group names in the prefix. And it just changes the name to the same color as the prefix and also makes my chat that same color. So my group prefix, my name, and my chat is all green.
     
  15. Offline

    XxFuNxX

    @Aero Hmm, i will try do fix that problem.
     
  16. Offline

    Cranky Miner

    When I change my name it's green but I want it white, how do I change that? Thank you ;)
     
  17. Offline

    XxFuNxX

  18. Offline

    Cranky Miner

    No, it's white.
     
  19. Offline

    ekgame

    Can you make it so I could change colors in some parts of the display name? For example "/CW &9ek&cGame" would change it to ekGame. Is that posible?
     
  20. Offline

    XxFuNxX

    @Cranky Miner Hm... i will check that out, currently im not on my computer, but when i get on it, i tell you
    @ekgame Yeah, possible, but im not on my computer right now. :(
     
  21. Offline

    Cranky Miner

    Can I help you with the plugin? I'm still a beginner but maybe I can help?
    You can add me on skype: crankyminer.
    I would really love to help you! ;)

    Cranky
     
  22. Offline

    Plague

    considered inactive
     
  23. Offline

    Gnicco

    A great plugin i think, although i recommend adding a way to set colors to the nickname. But anyways I have an error that says ''A internal error has occured....'' when doing the command, this haz never happened before so please support me with some assistance.
    Sincerly- Gnicco
     
  24. Offline

    XxFuNxX

    @Gnicco Well, this plugin is way outdated, if you have upgraded the cb build or something like that, it may cause the problem. I really dont now else, I dont have the source left so I can´t change or update it. I´m sorry. :(
     
  25. Offline

    xGhOsTkiLLeRx

    Bad excuse :p

    CookieWatch
    Code:java
    1. package com.XxFuNxX.CookieWatch;
    2.  
    3. import com.nijiko.permissions.PermissionHandler;
    4. import com.nijikokun.bukkit.Permissions.Permissions;
    5. import java.util.ArrayList;
    6. import java.util.HashMap;
    7. import java.util.logging.Logger;
    8. import org.bukkit.ChatColor;
    9. import org.bukkit.Server;
    10. import org.bukkit.block.Block;
    11. import org.bukkit.command.Command;
    12. import org.bukkit.command.CommandSender;
    13. import org.bukkit.entity.Player;
    14. import org.bukkit.event.Event.Priority;
    15. import org.bukkit.event.Event.Type;
    16. import org.bukkit.plugin.Plugin;
    17. import org.bukkit.plugin.PluginManager;
    18. import org.bukkit.plugin.java.JavaPlugin;
    19.  
    20. public class CookieWatch extends JavaPlugin
    21. {
    22. private static final Logger log = Logger.getLogger("Minecraft");
    23. private final CookieWatchBlockListener blockListener = new CookieWatchBlockListener(this);
    24. public final HashMap<Player, ArrayList<Block>> cwUsers = new HashMap();
    25. public static PermissionHandler Permissions;
    26.  
    27. public void onEnable()
    28. {
    29. PluginManager pm = getServer().getPluginManager();
    30. pm.registerEvent(Event.Type.BLOCK_BREAK, this.blockListener, Event.Priority.Normal, this);
    31. setupPermissions();
    32. log.info("[Name Change V 1.7 Enabled]// Cookie Watch");
    33. }
    34.  
    35. public void onDisable()
    36. {
    37. log.info("[Name Change V 1.7 Disabled!]// Cookie Watch");
    38. }
    39. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    40. if (commandLabel.equalsIgnoreCase("CW")) {
    41. toggleCW((Player)sender, args[0]);
    42. return true;
    43. }
    44. return false;
    45. }
    46.  
    47. private void setupPermissions() {
    48. Plugin test = getServer().getPluginManager().getPlugin("Permissions");
    49. if (Permissions == null)
    50. if (test != null)
    51. Permissions = ((Permissions)test).getHandler();
    52. else
    53. log.info("Permission system not detected, defaulting to OP");
    54. }
    55.  
    56. public void toggleCW(Player player, String s)
    57. {
    58. if (enabled(player)) {
    59. this.cwUsers.remove(player);
    60. player.getName();
    61. player.setDisplayName(player.getName());
    62. player.sendMessage(ChatColor.GREEN + "Name Chat Disabled Your Name Has (Hoppfuly) Been Reset!");
    63. }
    64. else {
    65. this.cwUsers.put(player, null);
    66. if (!Permissions.has(player, "cw.command")) {
    67. return;
    68. }
    69. player.sendMessage(ChatColor.GREEN + "Name Chat Enabled");
    70. player.setDisplayName(ChatColor.GREEN + s);
    71. }
    72. }
    73.  
    74. public boolean enabled(Player player)
    75. {
    76. return this.cwUsers.containsKey(player);
    77. }
    78. }
    79.  


    CookieWatchBlockListener
    Code:java
    1. package com.XxFuNxX.CookieWatch;
    2.  
    3. import org.bukkit.ChatColor;
    4. import org.bukkit.Material;
    5. import org.bukkit.block.Block;
    6. import org.bukkit.entity.Player;
    7. import org.bukkit.event.block.BlockBreakEvent;
    8. import org.bukkit.event.block.BlockListener;
    9.  
    10. public class CookieWatchBlockListener extends BlockListener
    11. {
    12. public static CookieWatch plugin;
    13.  
    14. public CookieWatchBlockListener(CookieWatch instance)
    15. {
    16. plugin = instance;
    17. }
    18. public void onBlockBreak(BlockBreakEvent event) {
    19. Block block = event.getBlock();
    20. Player player = event.getPlayer();
    21. if ((block.getType() == Material.CAKE) && (plugin.enabled(player))) {
    22. player.kickPlayer("Just For That Cake");
    23. player.sendMessage(ChatColor.RED + "You Destroyed A WonderFul Cake! Mark My Words I WILL BAN U");
    24. }
    25. }
    26. }


    It's your decompiled source ;)
    If you really want to update it, here you go :p

    (hihi)
     
  26. Offline

    XxFuNxX

    :p yeah, why not, but I think I remove that cookie thingy and rename and improve it alot ;D
     

Share This Page