From 1fd4bb48f8f50e59a409a7e8affdad991d41c0ba Mon Sep 17 00:00:00 2001 From: lixfel Date: Sat, 13 Apr 2019 23:41:51 +0200 Subject: [PATCH] Kitsystem fixes --- src/me/yaruma/fightsystem/commands/AkCommand.java | 10 +++++++--- src/me/yaruma/fightsystem/fight/FightTeam.java | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/me/yaruma/fightsystem/commands/AkCommand.java b/src/me/yaruma/fightsystem/commands/AkCommand.java index 4abf629..a4d9337 100644 --- a/src/me/yaruma/fightsystem/commands/AkCommand.java +++ b/src/me/yaruma/fightsystem/commands/AkCommand.java @@ -153,9 +153,13 @@ public class AkCommand implements CommandExecutor { Schematic schem = Schematic.getSchemFromDB(args[1], player.getUniqueId()); if(schem == null) { - player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic gibt es nicht!"); - return false; - }else if(schem.getSchemType() != Config.SchematicType) { + schem = Schematic.getSchemFromDB(args[1], 0); + if(schem == null){ + player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic gibt es nicht!"); + return false; + } + } + if(schem.getSchemType() != Config.SchematicType) { player.sendMessage(FightSystem.PREFIX + "§cDiese Schematic ist kein " + Config.GameName); return false; } diff --git a/src/me/yaruma/fightsystem/fight/FightTeam.java b/src/me/yaruma/fightsystem/fight/FightTeam.java index 51a4f17..cda7fde 100644 --- a/src/me/yaruma/fightsystem/fight/FightTeam.java +++ b/src/me/yaruma/fightsystem/fight/FightTeam.java @@ -204,7 +204,7 @@ public class FightTeam { List preSchematicList; List schematicList = new ArrayList<>(); if(publicSchematics) { - preSchematicList = Schematic.getSchemsOfType(0, schematicType); + preSchematicList = Schematic.getSchemsAccessibleByUser(0); } else { preSchematicList = Schematic.getSchemsAccessibleByUser(player.getUniqueId()); }