From 6a66507ecef6ef1d844db2abef410a0ba7828dbc Mon Sep 17 00:00:00 2001 From: cheeezburga <47320303+cheeezburga@users.noreply.github.com> Date: Sun, 16 Jun 2024 15:18:35 +1000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: LimeGlass <16087552+TheLimeGlass@users.noreply.github.com> --- src/main/java/ch/njol/skript/conditions/CondTooltip.java | 6 ++++-- src/main/java/ch/njol/skript/effects/EffTooltip.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/njol/skript/conditions/CondTooltip.java b/src/main/java/ch/njol/skript/conditions/CondTooltip.java index a0980e09453..8055241aa99 100644 --- a/src/main/java/ch/njol/skript/conditions/CondTooltip.java +++ b/src/main/java/ch/njol/skript/conditions/CondTooltip.java @@ -49,12 +49,14 @@ public class CondTooltip extends Condition { static { - if (Skript.methodExists(ItemMeta.class, "isHideTooltip")) // this method was added in the same version as the additional tooltip item flag + if (Skript.methodExists(ItemMeta.class, "isHideTooltip")) {// this method was added in the same version as the additional tooltip item flag Skript.registerCondition(CondTooltip.class, "[the] [entire|:additional] tool[ ]tip[s] of %itemtypes% (is|are) (:shown|hidden)", "[the] [entire|:additional] tool[ ]tip[s] of %itemtypes% (isn't|is not|aren't|are not) (:shown|hidden)", "%itemtypes%'[s] [entire|:additional] tool[ ]tip[s] (is|are) (:shown|hidden)", - "%itemtypes%'[s] [entire|:additional] tool[ ]tip[s] (isn't|is not|aren't|are not) (:shown|hidden)"); + "%itemtypes%'[s] [entire|:additional] tool[ ]tip[s] (isn't|is not|aren't|are not) (:shown|hidden)" + ); + } } @SuppressWarnings("NotNullFieldNotInitialized") diff --git a/src/main/java/ch/njol/skript/effects/EffTooltip.java b/src/main/java/ch/njol/skript/effects/EffTooltip.java index e9727e7290d..38a45f6944d 100644 --- a/src/main/java/ch/njol/skript/effects/EffTooltip.java +++ b/src/main/java/ch/njol/skript/effects/EffTooltip.java @@ -49,10 +49,12 @@ public class EffTooltip extends Effect { static { - if (Skript.methodExists(ItemMeta.class, "setHideTooltip", boolean.class)) // this method was added in the same version as the additional tooltip item flag + if (Skript.methodExists(ItemMeta.class, "setHideTooltip", boolean.class)) { // this method was added in the same version as the additional tooltip item flag Skript.registerEffect(EffTooltip.class, "(:show|hide) %itemtypes%'[s] [entire|:additional] tool[ ]tip", - "(:show|hide) [the] [entire|:additional] tool[ ]tip of %itemtypes%"); + "(:show|hide) [the] [entire|:additional] tool[ ]tip of %itemtypes%" + ); + } } @SuppressWarnings("NotNullFieldNotInitialized")