[PLUG-408] Material of new 1.16 blocks being read as "AIR" Created: 05/Jul/20 Updated: 05/Jul/20 Resolved: 05/Jul/20 |
|
| Status: | Resolved |
| Project: | SpigotPlugins |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Matthew Albert | Assignee: | Unassigned |
| Resolution: | Invalid | Votes: | 0 |
| Labels: | 1.16.1, Material | ||
| Environment: |
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; } }
|
||
| Attachments: |
|
| Version: | git-Spigot-ccb012a-567e245 (MC:1.16.1) |
| Plugin: | My Own WIP Plugin |
| Guidelines Read: | Yes |
| Description |
|
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.
|
| Comments |
| Comment by md_5 [ 05/Jul/20 ] |
|
You did not define api-version as 1.13 or greater. You were warned about this in your logs. |