File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
IF/src/main/java/com/github/stefvanschie/inventoryframework/gui/type/util Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 88import com .github .stefvanschie .inventoryframework .pane .component .*;
99import com .github .stefvanschie .inventoryframework .util .TriFunction ;
1010import com .github .stefvanschie .inventoryframework .util .XMLUtil ;
11+ import com .github .stefvanschie .inventoryframework .util .version .Version ;
1112import org .bukkit .Bukkit ;
1213import org .bukkit .Material ;
1314import org .bukkit .entity .HumanEntity ;
@@ -157,6 +158,11 @@ public Gui(@NotNull Plugin plugin) {
157158 this .plugin = plugin ;
158159
159160 if (!hasRegisteredListeners ) {
161+ /*This throws an exception if the version is unsupported. We want this thrown if our version is unsupported,
162+ to prevent people opening guis that do not behave correctly. */
163+ //noinspection ResultOfMethodCallIgnored
164+ Version .getVersion ();
165+
160166 Bukkit .getPluginManager ().registerEvents (new GuiListener (plugin ), plugin );
161167
162168 hasRegisteredListeners = true ;
You can’t perform that action at this time.
0 commit comments