Question seeHostileInvisibles() as a scoreboard option?

Discussion in 'Plugin Help/Development/Requests' started by TheMrJezza, Apr 25, 2015.

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

    TheMrJezza

    hi everyone, I have a question. There is an option on the scoreboard that allows players to see invisible players if they are on the same team as them ( canSeeFriendlyInvisibles), but I wanted to know if there was a plugin or a way to make the option in a plugin that would allow players to see invisible players from other teams and not just players from their own team.

    Thanks in advance.
     
  2. Offline

    pie_flavor

    @TheMrJezza You'd have to delve into CraftBukkit and NMS code to do that. It'd have to be custom packets that the scoreboard system also sends.
     
  3. Offline

    TheMrJezza

    @pie_flavor Well I only know very basic stuff, I don't even know java, I only know what I need to make bukkit plugins. I'm at the level after beginer so I wouldn't know how to edit bukkit code. Out of interest though, how hard would you say it is? I would be willing to try it if I knew where to start and what to do.
     
  4. Offline

    pie_flavor

    @TheMrJezza I would tell you if I knew. I know that once you've mastered custom packets you have a hell of a lot more power; you can do anything that clients can accept. However I don't know the first thing about packets except that ProtocolLib makes them about fifty times simpler. Good luck if you attempt it
     
  5. Offline

    TheMrJezza

    @pie_flavor Well Right now I'm working on a plugin like essentials called basics, it's how I'm learning to code bukkit plugins, so instead of trying to recode bukkit, I think I will try to work out how to put the different commands into different class's, do you know how to do that?
     
  6. Offline

    pie_flavor

    @TheMrJezza Yeah, it's a main feature of Bukkit. Make another class, which implements CommandExecutor. This has the method public boolean onCommand(CommandSender, Command, String, String[]). Then, in your onEnable, or wherever you think is best, do getCommand("command").setExecutor(new MyExecutor()) where MyExecutor is your commandexecutor class and command is your command.
    Alternatively, if you want better structure but keep everything in one class, you can check out this handy tutorial I made http://bukkit.org/threads/make-everything-simpler-in-java-8.342714/
     
Thread Status:
Not open for further replies.

Share This Page