-
Bug
-
Resolution: Invalid
-
Major
-
Tested on Ubuntu 18.04 and Windows 10.
Currently building a plugin using the new blocks.
The code for command used to print the Material is as follows:
public class MaterialInHandCommand implements CommandExecutor { public Beam plugin; public MaterialInHandCommand(Beam plugin){ this.plugin = plugin; this.plugin.getCommand("materialinhand").setExecutor(this); } @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) { if(!(commandSender instanceof Player)){ commandSender.sendMessage("Only players can execute this command"); return true; } Player p = (Player) commandSender; p.sendMessage(p.getInventory().getItemInMainHand().getType().name()); return false; } }
Tested on Ubuntu 18.04 and Windows 10. Currently building a plugin using the new blocks. The code for command used to print the Material is as follows: public class MaterialInHandCommand implements CommandExecutor { public Beam plugin; public MaterialInHandCommand(Beam plugin){ this .plugin = plugin; this .plugin.getCommand( "materialinhand" ).setExecutor( this ); } @Override public boolean onCommand(CommandSender commandSender, Command command, String s, String [] strings) { if (!(commandSender instanceof Player)){ commandSender.sendMessage( "Only players can execute this command" ); return true ; } Player p = (Player) commandSender; p.sendMessage(p.getInventory().getItemInMainHand().getType().name()); return false ; } }
-
git-Spigot-ccb012a-567e245 (MC:1.16.1)
-
My Own WIP Plugin
-
Yes
Hello, I am currently building a plugin using the new 1.16 blocks.
However, it is reading all the new blocks as "AIR" instead of what is in the JavaDoc
My plugin runs the following to produce the output in chat
p.sendMessage(p.getInventory().getItemInMainHand().getType().name());
I've mixed pictures of it behaving normally with older blocks and with the 1.16 blocks.
This seems to be occurring with all 1.16 items.