mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-17 06:11:06 +00:00
Optimise check for wand item
This commit is contained in:
@@ -54,6 +54,7 @@ import java.util.Objects;
|
|||||||
|
|
||||||
public class WandSVC implements IrisService {
|
public class WandSVC implements IrisService {
|
||||||
private static ItemStack dust;
|
private static ItemStack dust;
|
||||||
|
private static ItemStack wand;
|
||||||
|
|
||||||
public static void pasteSchematic(IrisObject s, Location at) {
|
public static void pasteSchematic(IrisObject s, Location at) {
|
||||||
s.place(at);
|
s.place(at);
|
||||||
@@ -253,7 +254,6 @@ public class WandSVC implements IrisService {
|
|||||||
* @return True if it is
|
* @return True if it is
|
||||||
*/
|
*/
|
||||||
public static boolean isWand(ItemStack is) {
|
public static boolean isWand(ItemStack is) {
|
||||||
ItemStack wand = createWand();
|
|
||||||
if (is.getItemMeta() == null) return false;
|
if (is.getItemMeta() == null) return false;
|
||||||
return is.getType().equals(wand.getType()) &&
|
return is.getType().equals(wand.getType()) &&
|
||||||
is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) &&
|
is.getItemMeta().getDisplayName().equals(wand.getItemMeta().getDisplayName()) &&
|
||||||
@@ -263,7 +263,7 @@ public class WandSVC implements IrisService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
ItemStack wand = createWand();
|
wand = createWand();
|
||||||
dust = createDust();
|
dust = createDust();
|
||||||
|
|
||||||
J.ar(() -> {
|
J.ar(() -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user