Skip to content

Commit

Permalink
Adjust to CodingAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzimmermann committed Aug 19, 2024
1 parent 1620267 commit 9f891d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ private void printConsoleInfo(Runnable runnable) {
log(" ");
log("Status:");
log(" ");
log("MC-Version: " + Version.get().fullVersion());
log("MC-Version: " + Version.fullVersion());
log(" ");

runnable.run();
Expand Down Expand Up @@ -270,7 +270,7 @@ private void afterOnEnable() {
}

private void updateCommandList() {
if (Version.get().isBiggerThan(Version.v1_12)) {
if (Version.after(12)) {
for (Player player : Bukkit.getOnlinePlayers()) {
player.updateCommands();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private boolean matchShulkerBoxContent(@NotNull ItemStack item) {
private boolean missMaterial(@NotNull ItemStack item) {
if (this.material == null) return false;

if (Version.get().isBiggerThan(Version.v1_12) || data == null) {
if (Version.after(12) || data == null) {
return item.getType() != this.material;
} else {
//noinspection deprecation
Expand Down Expand Up @@ -165,7 +165,7 @@ private boolean missLore(@NotNull ItemStack item) {
}

private boolean missCustomModelData(@NotNull ItemStack item) {
if (customModelData == null || Version.less(14)) return false;
if (customModelData == null || Version.before(14)) return false;

if (item.hasItemMeta() && item.getItemMeta() != null) {
return customModelData != item.getItemMeta().getCustomModelData();
Expand Down

0 comments on commit 9f891d7

Please sign in to comment.