This commit is contained in:
BenceX100 committed 2023-09-23 20:04:02 +02:00
1 parent 5c7bc5c0a9
commit 4923a4f323
2 files changed
+5 -4

No files matched your search

@@ -3,6 +3,7 @@ package com.artillexstudios.axsmithing.listener;
import com.artillexstudios.axsmithing.AxSmithingPlugin;
import com.viaversion.viaversion.api.Via;
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.event.Event;
import org.bukkit.event.EventHandler;
@@ -20,7 +21,7 @@ public class InteractListener implements Listener {
if (event.getAction().equals(Action.LEFT_CLICK_BLOCK)) return;
if (AxSmithingPlugin.is1_20()) {
if (Via.getAPI().getPlayerVersion(event.getPlayer()) == ProtocolVersion.v1_20.getVersion() && !AxSmithingPlugin.getConfiguration().getBoolean("menu.v1_20.force-for-1_20-clients")) {
if (Via.getAPI().getPlayerVersion(event.getPlayer()) >= ProtocolVersion.v1_20.getVersion() && !AxSmithingPlugin.getConfiguration().getBoolean("menu.1_20.force-for-1_20-clients")) {
return;
}
} else {
+3 -3
View File
@@ -1,7 +1,7 @@
menu:
# If your server version is 1.20+, this is what will be shown for lower version clients
"1_20":
title: '&7Upgrade items'
title: '&0Upgrade items'
rows: 3
template-slot: 10
item-slot: 11
@@ -25,7 +25,7 @@ menu:
# If your server version is 1.16+, this is what will be shown to 1.20+ clients
"1_16":
title: '&7Upgrade items'
title: '&0Upgrade items'
rows: 3
item-slot: 11
upgrade-slot: 12
@@ -42,7 +42,7 @@ menu:
material: air
messages:
prefix: "&#AA3428AxSmithing &7» "
prefix: "&#AA3428&lAxSmithing &7» "
no-permission: "&cYou do not have permission to do this!"
reload: "&aPlugin reloaded in %time%ms!"