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 file = new File(SchematicSystem.SCHEM_DIR + player.getUniqueId() + "/" + args[1] + ".schematic");
|
||||||
file.delete();
|
file.delete();
|
||||||
schematic.remove();
|
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.");
|
player.sendMessage(SchematicSystem.PREFIX + "Schematic §6" + args[1] + " §7gelöscht.");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.warking.schematicsystem.utils;
|
package de.warking.schematicsystem.utils;
|
||||||
|
|
||||||
|
import de.warking.hunjy.Core;
|
||||||
import de.warking.hunjy.MySQL.MySQL;
|
import de.warking.hunjy.MySQL.MySQL;
|
||||||
import de.warking.hunjy.MySQL.WarkingUser;
|
import de.warking.hunjy.MySQL.WarkingUser;
|
||||||
|
|
||||||
@ -73,6 +74,10 @@ public class CheckedSchematic {
|
|||||||
return lastDeclined;
|
return lastDeclined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void remove() {
|
||||||
|
Core.sql.update("DELETE FROM CheckedSchematic WHERE SchemOwner = " + this.SchemOwner + " AND SchemName = '" + this.SchemName + "'");
|
||||||
|
}
|
||||||
|
|
||||||
public String getSchemName() {
|
public String getSchemName() {
|
||||||
return SchemName;
|
return SchemName;
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren