Hello. I just want to add a custom command to this disguise plugin. Also, when someone is doing /disguise , his name is disguised but his rank is not. Like: [Owner] Adelin: Hello. [Owner] Adelin: /disguise [Owner] StrangerName: Hello. I hope you know what I mean. What I want? If the player type /disguise: [Owner] Adelin: Hello. [Owner] Adelin: /disguise [Member] Disguise: Hello. If the player type /undisguise: [Member] Disguise: Hello. [Member] Disguise: /undisguise [Owner] Adelin: Hello. My permissions plugin have a custom command for this. When the player is typing /disguise, the plugin will execute this command too with the player name: /manuaddv [name] prefix &6&lMember When the player is typing /undisguise, the plugin will execute this command too with the player name: /manudelv [name] prefix Also, nothing complicated. When someone is typing /disguise, the plugin will execute an extra command. This thing with /undisguise too. Here is the code: No more for you guys! .
@Adelin DO NOT BLIND CAST! How do you know the sender will be a player (Please do not respond with 'only players will use this command ')? Please check if the sender is an instanceof Player before casting it to be a player. You should use multiple classes for handling multiple commands You created 5 instances of Random for every time you run that method. You only need one instance for any plugin. Create a random field instead of a variable and only use that one instance of random. As for your disguise problem: create a command, set the player's display name to be that of the disguised player, and use something like ProtocolLib to add the fake player.
@Zombie_Striker I don't have created this plugin. I just want to add this command, nothing else. Can't you see the credits? ' Made by MCGamer Dev Team '
@Adelin Now, how the hell did you get your hands on a private plugin made by a server network? This plugin is most probably copyrighted and/or obtained illegally, as far as I can know.
@MOMOTHEREAL No, it seems to me that he obtained it legally, the original poster created a thread last month and this class was posted as comment on that thread where as he further replied he recieved this from the original author. link
@MOMOTHEREAL Go and ask MCGamer Developers for it. They will give it to you for money. Btw, can someone add these 2 commands or not... ?
@Adelin We don't support modifying others' code here. You're welcome to figure it out yourself, however.