Fix 1.9-1.12 WorldEditRenderer
This commit is contained in:
@@ -43,6 +43,8 @@ public class WorldEditRenderer {
|
|||||||
|
|
||||||
private static final Vector ONES = new Vector(1, 1, 1);
|
private static final Vector ONES = new Vector(1, 1, 1);
|
||||||
|
|
||||||
|
private static final Material WAND = Material.valueOf(Core.getVersion() > 12 ? "WOODEN_AXE" : "WOOD_AXE");
|
||||||
|
|
||||||
private final WorldEditPlugin we;
|
private final WorldEditPlugin we;
|
||||||
|
|
||||||
public WorldEditRenderer() {
|
public WorldEditRenderer() {
|
||||||
@@ -54,7 +56,7 @@ public class WorldEditRenderer {
|
|||||||
private void render() {
|
private void render() {
|
||||||
for(Player player : Bukkit.getOnlinePlayers()) {
|
for(Player player : Bukkit.getOnlinePlayers()) {
|
||||||
//noinspection deprecation
|
//noinspection deprecation
|
||||||
if(player.getItemInHand().getType() != Material.WOODEN_AXE)
|
if(player.getItemInHand().getType() != WAND)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
LocalSession session = we.getSession(player);
|
LocalSession session = we.getSession(player);
|
||||||
|
|||||||
Reference in New Issue
Block a user