1.7.8 update that ... the world... and some old changes...

Discussion in 'Plugin Development' started by Smerfa, Apr 13, 2014.

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

    Smerfa

    Why Bukkit.getPlayer(nickname) is deprecated?
    How to get player from command argument?
    /tell f81d4fae-7dec-11d0-a 765-00a0c91e6bf6 isn't good idea...

    I can just use it ( Bukkit.getPlayer(nickname) ), and get warning, but if is depreciated then maybe in next update just disappear, or don't work properly...


    In every update, one or more options are marked as deprecated and any new options to do this same actions isn't added, eg: Player.getTargetBlock, and any new option for that...

    Or how to change data value (like color of wool) without know type of item? You must create code for every item type... to change one stupid number. (In give command, in /changeType command.... etc...)

    Maybe just mark whole bukkit.jar as deprecated? that will be faster...
    API should be easy and friendly to use, but for most of actions you must use NMS, CraftBukit or reflections like EnchantmentWrapper.registerEnchantment(enchantment) just don't work because of reasons....


    Everything is deprecated or don't work, or is impossible in bukkit but easy in NMS/reflections...

    How to create plugins without warnings?
     
  2. Offline

    Jozeth

    Start reading announcements, that's what they're there for.
     
    TigerHix likes this.
  3. Offline

    TigerHix

    I don't understand also as an OCD. I think it's a warning from Bukkit, telling you "Haha you wanna know why? Go Bukkit forum!" and then you will know that oh, we switch to UUID when storing player's data persistently. So it's not really deprecated, I guess.


    EDIT: What the hell, why my answer is always late a bit.
     
    Konkz and Jozeth like this.
  4. Offline

    Smerfa

    Yhym... but other methods are also deprecated (not in this version) like this Player.getTargetBlock or just don't work like EnchantmentWrapper.registerEnchantment(enchantment)

    Or you must create 100x more code to do one easy change, like change data value of item...
     
  5. Offline

    Jozeth

    Like what TigerHix said, you can still get the player via Bukkit's methods, because I don't think you can change your name when you're online, but the only worry I have is when it comes to offline player, what do we do then?
     
  6. Offline

    Smerfa

    How will work getOfflinePlayer(<random non-premium nickname here>) that will return null because no UUID was found for that nickname?


    Hyyym... and one more... how that work on offline server? just UUID options don't work? or? (offline, so you don't have connection with mojang UUID server)
    Player just don't have UUID or only premium have? And if premium have... then only "real premium", or even if I join with "Notch" nickname and then I have "Notch" UUID?
     
  7. Offline

    Jozeth

    I'm on about a player that's not online, not a non-premium player, because if I try to ban 'John' for griefing but 'John' has actually changed it their name to 'Johnny', so I've now banned 'John'.

    Edit: UUID only works for online servers (online-mode:true).
     
  8. Offline

    Smerfa

    Jozeth
    Command will be get UUID of 'John' and ban this UUID, not nickname :> UUID can be get form Mojang severs if player isn't online, so no problem here :p

    Hyyym, So if I get UUID of player on offline-mode I just get null?
    So offline-server have problems :D if eg: WorldGuard update system to use UUID, then offline server can't use this plugin?
    Maybe that is good, but some only-premium servers have offline mode for some reasons (bungeecord? some special plugins, systems?) but just kicking players without premium.
     
  9. Offline

    Jozeth

    You didn't answer my question properly, 'John' will still be banned because the old 'John' is now 'Johnny'.
    The new 'John's' UUID will get banned not the actual griefer who is now 'Johnny'.
     
  10. Offline

    Smerfa

    Ahhh... he changed nickname before get ban?
    Hyyym... then you have problem, but... that just like 1:1 000 000 to get this problem :p
    Mojang will don't allow to changing nicknames like 20 times per day :>

    Hyyym, and about that
    Names should by first, UUID is need for save/load and some functions like bans, but for most actions you using nickname

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

    Jozeth

    "Hyyym"?
     
  12. Offline

    Smerfa

    You don't know what that mean? :D sorry, I event don't know how to translate it to English, that just 'thinking', this weird sound when some people 'thinking'!
    I can't don't using this :< even in this message I trying use it...
     
  13. Smerfa Bukkit doesn't support offline mode servers.
     
  14. Offline

    Jozeth

    When did Smerfa ask for help for an offline server?
     
  15. Jozeth
     
  16. Offline

    Jozeth

    AdamQpzm But his primary question was:
    So don't jump to conclusions as, he might just be worried of people who may use his/hers plugin and there server's in offline mode or he/she could have been curious.
     
  17. Jozeth I never said he shouldn't be helped or that was all he was looking for help for, I was simply pointing out that his worries about offline servers are irrelevant as they are not supported by Bukkit. I believe you are jumping to conclusions. :)
     
  18. Offline

    Jozeth

    No you're jumping to conclusions, I never said he shouldn't be helped by your statement.
    :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)
     
    AdamQpzm likes this.
Thread Status:
Not open for further replies.

Share This Page