This null pointer is beyond me, request only PROS look at this code!

Discussion in 'Plugin Development' started by stickman561, Aug 22, 2014.

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

    stickman561

    So I am making a plugin that changes your player name and skin to Herobrine, but whenever a player uses the command, it throws this exception in the console:
    Code:
    [11:06:31 ERROR]: null
    org.bukkit.command.CommandException: Unhandled exception executing command 'herobrine' in plugin YouAreTheHerobrine v0.1.5
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:175) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.dispatchCommand(CraftServer.java:683) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PlayerConnection.handleCommand(PlayerConnection.java:952) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PlayerConnection.a(PlayerConnection.java:814) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PacketPlayInChat.a(PacketPlayInChat.java:28) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PacketPlayInChat.handle(PacketPlayInChat.java:47) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.NetworkManager.a(NetworkManager.java:146) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:655) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:250) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:545) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NullPointerException
        at com.snakec0de.youaretheherobrine.YouAreTheHerobrineCore.herobrineify(YouAreTheHerobrineCore.java:134) ~[?:?]
        at com.snakec0de.youaretheherobrine.YouAreTheHerobrineCore.onCommand(YouAreTheHerobrineCore.java:29) ~[?:?]
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 13 more
    A normal looking exception, but my code is a little, how should I put it, complex. Here it is for those who dare try to fix this:

    Code:java
    1. package com.snakec0de.youaretheherobrine;
    2.  
    3. import java.lang.reflect.Constructor;
    4. import java.lang.reflect.Field;
    5. import java.lang.reflect.InvocationTargetException;
    6. import java.lang.reflect.Method;
    7.  
    8. import org.bukkit.ChatColor;
    9. import org.bukkit.command.Command;
    10. import org.bukkit.command.CommandExecutor;
    11. import org.bukkit.command.CommandSender;
    12. import org.bukkit.entity.Player;
    13. import org.bukkit.plugin.java.JavaPlugin;
    14.  
    15. public class YouAreTheHerobrineCore extends JavaPlugin implements CommandExecutor {
    16.  
    17. public void onEnable() {
    18.  
    19. }
    20.  
    21. public void onDisable() {
    22.  
    23. }
    24.  
    25. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    26. if (cmd.getName().equalsIgnoreCase("herobrine")) {
    27. if(args.length == 0) {
    28. if(sender instanceof Player) {
    29. herobrineify((Player)sender, "Herobrine");
    30. return true;
    31. }
    32. sender.sendMessage(ChatColor.RED + "Only a player can become herobrine!");
    33. return true;
    34. }
    35. return true;
    36. }
    37. return false;
    38. }
    39.  
    40. @SuppressWarnings("rawtypes")
    41. public void herobrineify(Player player, String name) {
    42. Method getHandle = null;
    43. Object entityplayer = null;
    44. Object realname = null;
    45. Field field = null;
    46.  
    47. try {
    48. getHandle = player.getClass().getMethod("getHandle");
    49. entityplayer = getHandle.invoke(player);
    50. field = entityplayer.getClass().getField("name");
    51. realname = field.get(entityplayer);
    52. field.set(entityplayer, name);
    53. }
    54.  
    55. player.sendMessage(ChatColor.RED + "FATAL ERROR: Could not find method handle!");
    56. }
    57.  
    58. catch (SecurityException e) {
    59. player.sendMessage(ChatColor.RED + "FATAL ERROR: Insecure method!");
    60. }
    61.  
    62. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal object access!");
    63. }
    64.  
    65. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal arguments in main class declaration!");
    66. }
    67.  
    68. player.sendMessage(ChatColor.RED + "FATAL ERROR: Target object is invoked!");
    69. }
    70.  
    71. player.sendMessage(ChatColor.RED + "FATAL ERROR: Field field is undefined in main class!");
    72. }
    73.  
    74. for(Player onlineplayer:getServer().getOnlinePlayers()) {
    75. if(onlineplayer == player) continue;
    76.  
    77. try {
    78. Object onlineentity = getHandle.invoke(onlineplayer);
    79. Field playercfield = onlineentity.getClass().getField("playerConnection");
    80. Object playerconnection = playercfield.get(onlineentity);
    81.  
    82. for(Method m:playerconnection.getClass().getMethods()) {
    83. if(m.getName().equals("sendPacket")) {
    84. player.sendMessage(ChatColor.GREEN + "Found method!");
    85. String nmsPackage = playerconnection.getClass().getPackage().getName();
    86. player.sendMessage(ChatColor.GREEN + nmsPackage);
    87. Class spawnpacket = Class.forName(nmsPackage + ".Packet20NamedEntitySpawn");
    88. for(Constructor c:spawnpacket.getConstructors()) {
    89. if(c.getParameterTypes().length == 1) {
    90. player.sendMessage(ChatColor.GREEN + "Found parameter!");
    91. Object packet = c.newInstance(entityplayer);
    92. m.invoke(playerconnection, packet);
    93. }
    94. }
    95. }
    96. }
    97. }
    98.  
    99. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal object access!");
    100. }
    101.  
    102. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal argument in main class declaration!");
    103. }
    104.  
    105. player.sendMessage(ChatColor.RED + "FATAL ERROR: Object target is invoked!");
    106. }
    107.  
    108. player.sendMessage(ChatColor.RED + "FATAL ERROR: No such field found!");
    109. }
    110.  
    111. catch (SecurityException e) {
    112. player.sendMessage(ChatColor.RED + "FATAL ERROR: Insecured object!");
    113. }
    114.  
    115. player.sendMessage(ChatColor.RED + "FATAL ERROR: Class not found!");
    116. }
    117.  
    118. player.sendMessage(ChatColor.RED + "FATAL ERROR: Instantation!");
    119. }
    120. }
    121.  
    122. try {
    123. field.set(entityplayer, realname);
    124. }
    125.  
    126. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal arguments in main class declaration!");
    127. }
    128.  
    129. player.sendMessage(ChatColor.RED + "FATAL ERROR: Illegal object access!");
    130. }
    131. }
    132. }
    133.  


    If it helps, it's throwing the nosuchfield exception.
     
  2. Offline

    fireblast709

    stickman561
    • Why setting a Player's name (for a fact, if you look at the CB source, there is no field 'name' in EntityPlayer)
    • Just construct one Packet (previous fact elaborated, your code is horribly out of date)
    • Why are you doing the reflection process over and over again for each player, this is seriously inefficient.
    • Your NullPointerException is caused by the first point.
     
  3. Offline

    ferrago

    stickman561

    Are you ensuring the sender is a player? If the player is not a sender your field would remain null I believe.

    As well I do not see a field "name" in CB that could also be your issue.
     
  4. Offline

    Necrodoom

    So your reflection code led to an exception, causing realname and maybe entityplayer to not be set and stay null. And then you try to use a method on them, generating NPE. Find out why your reflection fails, instead of hiding the errors.
     
  5. Offline

    stickman561

    It is that there is no name field! I am now attempting to compensate and I will see what happens...

    I have completely redone the code, now the whole plugin crashes before I can even get to test it! Heres the console error and new code:

    Code:
    [15:14:22 ERROR]: Could not load 'plugins/YouAreTheHerobrine.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: net/minecraft/server/v1_6_R3/Entity
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:137) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:313) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:236) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.loadPlugins(CraftServer.java:350) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.craftbukkit.v1_7_R1.CraftServer.<init>(CraftServer.java:312) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.PlayerList.<init>(PlayerList.java:63) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedPlayerList.<init>(SourceFile:14) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.DedicatedServer.init(DedicatedServer.java:126) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java:424) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:617) [craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
    Caused by: java.lang.NoClassDefFoundError: net/minecraft/server/v1_6_R3/Entity
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_40]
        at java.lang.Class.forName(Class.java:270) ~[?:1.7.0_40]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 9 more
    Caused by: java.lang.ClassNotFoundException: net.minecraft.server.v1_6_R3.Entity
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:67) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.7.0_40]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.7.0_40]
        at java.lang.Class.forName0(Native Method) ~[?:1.7.0_40]
        at java.lang.Class.forName(Class.java:270) ~[?:1.7.0_40]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:40) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.3-b3020jnks]
        ... 9 more
    Code:java
    1. package com.snakec0de.yath;
    2.  
    3. import net.minecraft.server.v1_6_R3.EntityPlayer;
    4. import net.minecraft.server.v1_6_R3.EntityTracker;
    5. import net.minecraft.server.v1_6_R3.WorldServer;
    6. import org.bukkit.ChatColor;
    7. import org.bukkit.Material;
    8. import org.bukkit.command.Command;
    9. import org.bukkit.command.CommandExecutor;
    10. import org.bukkit.command.CommandSender;
    11. import org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer;
    12. import org.bukkit.entity.Player;
    13. import org.bukkit.inventory.ItemStack;
    14. import org.bukkit.plugin.java.JavaPlugin;
    15.  
    16. public class YATHCore extends JavaPlugin implements CommandExecutor {
    17.  
    18. public void onEnable() {
    19.  
    20. }
    21.  
    22. public void onDisable() {
    23.  
    24. }
    25.  
    26. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    27. if(cmd.getName().equalsIgnoreCase("herobrine")) {
    28. if (!(sender instanceof CraftPlayer)) {
    29. sender.sendMessage(ChatColor.RED + "Only a player can become herobrine!");
    30. return true;
    31. }
    32.  
    33. else {
    34. EntityPlayer player = ((CraftPlayer)sender).getHandle();
    35. Player senderplayer = (Player)sender;
    36. sender.sendMessage(ChatColor.DARK_RED + "You are now disguised as Herobrine!");
    37. senderplayer.setDisplayName("Herobrine");
    38. setPlayerName(player, "Herobrine");
    39. return true;
    40. }
    41. }
    42. return false;
    43. }
    44.  
    45. public void setPlayerName(EntityPlayer player, String newname) {
    46. WorldServer world = (WorldServer)player.world;
    47. EntityTracker tracker = world.tracker;
    48. tracker.untrackEntity(player);
    49. player.displayName = newname;
    50. tracker.track(player);
    51. }
    52. }


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

    Necrodoom

  7. Offline

    stickman561

    Please tell the correct code, I am not sure what you mean by that.
     
  8. Offline

    Necrodoom

    stickman561 you import v1.6_R3, but you don't run a 1.6.4 MC server. You need the correct NMS version.

    If you don't know how NMS works I'd advice you to stay away from itand use bukkit API only.
     
  9. Offline

    stickman561

    Dude, it's the only nms in this bukkit update! A little help?
     
  10. Offline

    Lactem

    What version is your minecraft server?
     
  11. Offline

    Gater12

    stickman561
    If you do not know how to use NMS or even what NMS is for, then you should stay away from it.

    NMS code can and will change thus the Bukkit Team is discouraging developers to use them by changing the package names every version update.
     
  12. Offline

    PandazNWafflez

    stickman561 you need to use a CraftBukkit version for the same Minecraft version as the CraftBukkit jar your server is running.
     
  13. Offline

    stickman561

    I am, I literally copy-pasted craftbukkit 1.7.2-R03.jar from my server to the eclipse build path!
     
  14. Offline

    Necrodoom

    stickman561 you have no idea how NMS works, don't you?
     
    jacklin213 likes this.
  15. Offline

    jacklin213

    Probs not
     
  16. Offline

    stickman561

    Do you have to beat me up over it not being my best category? I stare at code, I learn how it works, I use it. That's how I learn. I am only just starting with NMS code, can someone just please answer why it throws an error? I have used craftplayer before...
     
  17. Offline

    xTigerRebornx

    stickman561 They've already said exactly why it doesn't work.
     
  18. Offline

    stickman561

    Just found out that I imported a previous jar file, will test now and respond with results... I feel like such a derp now.

    I think it works, I'll have to get a friend on tomorrow to see if I change.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
    iMurder likes this.
  19. Offline

    AnorZaken

    stickman561
    ...Also you really shouldn't just catch all those event like that. At least add return-statements to them if you are completely satisfied with how you handle them. As it stands you do this:
    A. "try to do X"
    B. "if it didn't work print a little message before continuing"
    C. "try to do Y that depends on X succeeding"

    Since C requires A to succeed you must stop in B if it doesn't, but you don't, you just continue on... and that is bound to fail.
     
  20. Offline

    stickman561

    Perhaps you should all see my up-to-date code...
    Code:java
    1. package com.snakec0de.yath;
    2.  
    3.  
    4. import java.util.ArrayList;
    5. import java.util.List;
    6. import java.util.UUID;
    7.  
    8. import net.minecraft.server.v1_7_R1.*;
    9.  
    10. import org.bukkit.ChatColor;
    11. import org.bukkit.Material;
    12. import org.bukkit.SkullType;
    13. import org.bukkit.command.Command;
    14. import org.bukkit.command.CommandExecutor;
    15. import org.bukkit.command.CommandSender;
    16. import org.bukkit.craftbukkit.v1_7_R1.entity.CraftPlayer;
    17. import org.bukkit.entity.Player;
    18. import org.bukkit.inventory.ItemStack;
    19. import org.bukkit.inventory.meta.SkullMeta;
    20. import org.bukkit.plugin.java.JavaPlugin;
    21.  
    22. public class YATHCore extends JavaPlugin implements CommandExecutor {
    23. public ItemStack torches = new ItemStack(Material.REDSTONE_TORCH_ON, 2304);
    24. public boolean isabrine;
    25. public String playername = null;
    26. public UUID herobrine = null;
    27. public ItemStack[] stuff = null;
    28.  
    29. public void onEnable() {
    30. this.isabrine = false;
    31. }
    32.  
    33. public void onDisable() {
    34.  
    35. }
    36.  
    37. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
    38. if(cmd.getName().equalsIgnoreCase("herobrine")) {
    39. if (!(sender instanceof CraftPlayer)) {
    40. sender.sendMessage(ChatColor.RED + "Only a player can become herobrine!");
    41. return true;
    42. }
    43.  
    44. else {
    45. EntityPlayer player = ((CraftPlayer)sender).getHandle();
    46. Player senderplayer = (Player)sender;
    47.  
    48. if(!this.isabrine) {
    49. sender.sendMessage(ChatColor.DARK_RED + "You are now disguised as Herobrine!");
    50. this.playername = senderplayer.getName();
    51. senderplayer.setDisplayName("Herobrine");
    52. setPlayerName(player, "Herobrine");
    53. this.stuff = senderplayer.getInventory().getContents();
    54. this.herobrine = senderplayer.getUniqueId();
    55. this.isabrine = true;
    56. senderplayer.getInventory().clear();
    57. senderplayer.getInventory().addItem(this.torches);
    58. return true;
    59. }
    60.  
    61. else {
    62. sender.sendMessage(ChatColor.RED + "Herobrine is already in your world!");
    63. return true;
    64. }
    65. }
    66. }
    67.  
    68. else if(cmd.getName().equalsIgnoreCase("unherobrine")) {
    69. if(sender instanceof Player) {
    70. if(this.isabrine) {
    71. Player player = (Player)sender;
    72. player.setDisplayName(this.playername);
    73. EntityPlayer eplayer = ((CraftPlayer)sender).getHandle();
    74. eplayer.displayName = this.playername;
    75. this.playername = null;
    76. this.isabrine = false;
    77. this.herobrine = null;
    78. player.getInventory().clear();
    79. player.getInventory().addItem(this.stuff);
    80. this.stuff = null;
    81. return true;
    82. }
    83.  
    84. else {
    85. sender.sendMessage(ChatColor.DARK_RED + "You can't undisguise herobrine because there's no herobrine on this server!");
    86. }
    87. }
    88.  
    89. else {
    90. sender.sendMessage(ChatColor.DARK_RED + "You aren't a player!");
    91. return true;
    92. }
    93. }
    94.  
    95. else if(cmd.getName().equalsIgnoreCase("scare")) {
    96. if(sender instanceof Player) {
    97. Player player = (Player)sender;
    98. if(player.getUniqueId() == this.herobrine || player.hasPermission("yath.bypass") || player.isOp()) {
    99. if(args.length == 0) {
    100. sender.sendMessage(ChatColor.RED + "Insufficient arguments! Use /scare help to list your scares!");
    101. return true;
    102. }
    103.  
    104. else if(args[0].equals("help")) {
    105. sender.sendMessage(ChatColor.LIGHT_PURPLE + "Scares are:");
    106. sender.sendMessage(ChatColor.DARK_RED + "/scare head - Gives the poor guy his own head!");
    107. sender.sendMessage(ChatColor.GOLD + "/scare smite - One word: lightning");
    108. sender.sendMessage(ChatColor.ITALIC + "/scare paranoia - If they move, 5% chance of random noise!");
    109. return true;
    110. }
    111.  
    112. else if(args[0].equals("head")) {
    113. if(!args[1].equals(null)) {
    114. Player scared = getServer().getPlayer(args[1]);
    115. if(scared != null) {
    116. ItemStack head = new ItemStack(Material.SKULL_ITEM, 1, (short)SkullType.PLAYER.ordinal());
    117. SkullMeta m = (SkullMeta)head.getItemMeta();
    118. m.setOwner(scared.getName());
    119. List <String>s = new ArrayList<String>();
    120. s.add(ChatColor.RED + "From Herobrine");
    121. m.setLore(s);
    122. head.setItemMeta(m);
    123. scared.getInventory().addItem(head);
    124. return true;
    125. }
    126.  
    127. else {
    128. sender.sendMessage(ChatColor.DARK_RED + "Mr. Herobrine, sir, that guy's not online!");
    129. return true;
    130. }
    131. }
    132.  
    133. else {
    134. sender.sendMessage(ChatColor.DARK_RED + "You forgot to define which player to scare, Mr. Herobrine, sir.");
    135. return true;
    136. }
    137. }
    138.  
    139. else {
    140. sender.sendMessage(ChatColor.RED + "Unknown scare!");
    141. return true;
    142. }
    143. }
    144.  
    145. else {
    146. sender.sendMessage(ChatColor.DARK_RED + "You aren't herobrine!");
    147. return true;
    148. }
    149. }
    150. else {
    151. sender.sendMessage(ChatColor.DARK_RED + "You are not a player!");
    152. return true;
    153. }
    154. }
    155. return false;
    156. }
    157.  
    158. public void setPlayerName(EntityPlayer player, String newname) {
    159. WorldServer world = (WorldServer)player.world;
    160. EntityTracker tracker = world.tracker;
    161. tracker.untrackEntity(player);
    162. player.displayName = newname;
    163. tracker.track(player);
    164. this.isabrine = true;
    165. }
    166. }
    167.  
     
  21. Offline

    jthort

    stickman561 I would recommend grabbing the commands and description from the plugin.yml rather than hard coding it in.
     
  22. Offline

    stickman561

    I have always hard coded commands as well as put them in the plugin.yml as a double check, it makes them more responsive. (tab autofill works faster and command activates faster.)
     
Thread Status:
Not open for further replies.

Share This Page