-----> CheckID <----- MADE

Discussion in 'Archived: Plugin Requests' started by Trust518, Mar 14, 2012.

  1. Offline

    Trust518

    Plugin category: [Help]

    Suggested name: CheckID.

    A bit about me: Im just a normal server hoster messing with plugins.

    What i want: a plugin that will tell me the id of the item i hold :)

    Ideas for commands: /checkID

    Ideas for permissions: CheckID.check

    When i'd like it by: As fast as possible :D

    Similar plugin request: None

    Devs who might be interested in this: No idea.

    http://dl.dropbox.com/u/58518437/CheckID.jar CheckID by = CRAZYxMUNK3Y - The 1 i use!
    https://github.com/tyzoid/CheckID/downloads CheckID by = tyzoid

    Thanks guys for making this!
     
  2. Offline

    tyzoid

  3. Offline

    CRAZYxMUNK3Y

    Trust518

    I could do this for you, will start it when i get home from TAFE.
     
  4. Offline

    Trust518

    Last edited by a moderator: May 24, 2016
  5. Offline

    tyzoid

    I'll take this one :p

    I already started it :p

    You can take it over from me once I write it though... :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 24, 2016
    Trust518 likes this.
  6. Offline

    CRAZYxMUNK3Y

    I started too :p (As i have some time)


    Will let you do it though.

    tyzoid
    Done(Basic version)
    Code:java
    1.  
    2. package me.ben.CheckID;
    3.  
    4. import org.bukkit.ChatColor;
    5. import org.bukkit.Material;
    6. import org.bukkit.command.Command;
    7. import org.bukkit.command.CommandSender;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.plugin.java.JavaPlugin;
    10.  
    11. public class CheckID extends JavaPlugin{
    12.  
    13. public void onEnable(){
    14.  
    15. }
    16.  
    17. public void onDisable(){
    18.  
    19. }
    20.  
    21. @Override
    22. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] arg) {
    23. if (commandLabel.equalsIgnoreCase("CheckID") && sender.hasPermission("CheckID.check")){
    24. Player player = ((Player)sender);
    25. Material item = player.getItemInHand().getType();
    26. int itemID = player.getItemInHand().getTypeId();
    27. player.sendMessage(ChatColor.GREEN + "You have a " + item + " which has the ID of " + itemID);
    28.  
    29.  
    30. }
    31. return true;
    32. }
    33.  
    34. }
    35.  


    Trust518
    Item in hand and /checkid = You have a (Item) which has the ID of (ItemID), can only be done if player has permission CheckID.check, or is OP
    Want more?

    Link if you want it: http://dl.dropbox.com/u/58518437/CheckID.jar

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

    Trust518

     
    CoKoC likes this.
  8. Offline

    tyzoid

    Dang, you beat me to it...

    Anyway, mine is more extensible... :p
     
  9. Offline

    Trust518

    You cant allways win ;) but thanks anyway!
     
  10. Offline

    tyzoid

  11. Offline

    CRAZYxMUNK3Y

  12. Offline

    tyzoid

    One last thing before I leave this thread...

    I used my template (https://github.com/tyzoid/Template) to make this plugin... I find it pretty useful.
     
  13. Offline

    CRAZYxMUNK3Y

    If you don't mind, i might also use it. Also, im assuming onPlayerCommandPreprocess() is same a onCommand(), just a bit easier to work with, and only limites the command use to players?
     
  14. Offline

    tyzoid

    Basically.

    If you noticed, I have it licensed under the WTHPL (Exactly like the WTFPL, but with heck instead of f***)
    ya know, cause there are kids here...
     

Share This Page