CheckedSchematic will now be removed from table when deleting an arena schematic
Signed-off-by: yaruma3341 <yaruma3341@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
99670c87b1
Commit
6e348cd6ba
@ -149,6 +149,14 @@ public class SchematicCommand implements CommandExecutor {
|
||||
File file = new File(SchematicSystem.SCHEM_DIR + player.getUniqueId() + "/" + args[1] + ".schematic");
|
||||
file.delete();
|
||||
schematic.remove();
|
||||
|
||||
List<CheckedSchematic> checkedSchematics = CheckedSchematic.getLastDeclined(player.getUniqueId());
|
||||
for(CheckedSchematic checkedSchematic : checkedSchematics) {
|
||||
if(checkedSchematic.getSchemOwner() == schematic.getSchemOwner() &&
|
||||
checkedSchematic.getSchemName() == schematic.getSchemName())
|
||||
checkedSchematic.remove();
|
||||
}
|
||||
|
||||
player.sendMessage(SchematicSystem.PREFIX + "Schematic §6" + args[1] + " §7gelöscht.");
|
||||
return false;
|
||||
} else {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.warking.schematicsystem.utils;
|
||||
|
||||
import de.warking.hunjy.Core;
|
||||
import de.warking.hunjy.MySQL.MySQL;
|
||||
import de.warking.hunjy.MySQL.WarkingUser;
|
||||
|
||||
@ -73,6 +74,10 @@ public class CheckedSchematic {
|
||||
return lastDeclined;
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
Core.sql.update("DELETE FROM CheckedSchematic WHERE SchemOwner = " + this.SchemOwner + " AND SchemName = '" + this.SchemName + "'");
|
||||
}
|
||||
|
||||
public String getSchemName() {
|
||||
return SchemName;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren