mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2024-11-14 10:45:23 +01:00
Fix crash when using mysql without UUIDs
This commit is contained in:
parent
893ef67ff6
commit
64badad148
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>at.pcgamingfreaks</groupId>
|
||||
<artifactId>Minepacks</artifactId>
|
||||
<version>2.0.3</version>
|
||||
<version>2.0.4</version>
|
||||
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:GeorgH93/Minepacks.git</connection>
|
||||
|
@ -60,7 +60,7 @@ Database:
|
||||
# Defines the max amount of days backpacks will be stored. -1 to disable auto cleanup
|
||||
MaxInactiveDays: -1
|
||||
# If you would like to use UUIDs, it is recommended not to change this setting unless you know what you are doing!
|
||||
# true: Only to use if your server is running in online mode and your minecraft version is 1.7.5 or newer
|
||||
# true: Should be used if your server is running Minecraft 1.7.5 or newer
|
||||
# false: In offline mode or for minecraft version below 1.7.5
|
||||
# If you are using BungeeCord please set this setting based on your BungeeCord's online mode!!!
|
||||
UseUUIDs: true
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 GeorgH93
|
||||
* Copyright (C) 2019 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -24,12 +24,11 @@
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class ReloadCommand extends MinepacksCommand
|
||||
{
|
||||
private Message messageReloading, messageReloaded;
|
||||
private final Message messageReloading, messageReloaded;
|
||||
|
||||
public ReloadCommand(Minepacks plugin)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ public Database(Minepacks mp)
|
||||
maxAge = plugin.getConfiguration().getAutoCleanupMaxInactiveDays();
|
||||
unCacheStrategie = bungeeCordMode ? new OnDisconnect(this) : UnCacheStrategie.getUnCacheStrategie(this);
|
||||
backupFolder = new File(this.plugin.getDataFolder(), "backups");
|
||||
if(!backupFolder.exists()) backupFolder.mkdirs();
|
||||
if(!backupFolder.exists() && backupFolder.mkdirs()) mp.getLogger().info("Failed to create backups folder.");
|
||||
}
|
||||
|
||||
public void init()
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2016-2018 GeorgH93
|
||||
* Copyright (C) 2019 GeorgH93
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -57,7 +57,7 @@ protected void checkDB()
|
||||
else
|
||||
{
|
||||
DBTools.updateDB(connection, replacePlaceholders("CREATE TABLE IF NOT EXISTS {TablePlayers} (\n{FieldPlayerID} INT UNSIGNED NOT NULL AUTO_INCREMENT,\n{FieldName} CHAR(16) NOT NULL,\n" +
|
||||
"\nPRIMARY KEY ({FieldPlayerID}),\nUNIQUE INDEX {FieldUUID}_UNIQUE ({FieldUUID})\n);"));
|
||||
"\nPRIMARY KEY ({FieldPlayerID})\n);"));
|
||||
}
|
||||
DBTools.updateDB(connection, replacePlaceholders("CREATE TABLE IF NOT EXISTS {TableBackpacks} (\n{FieldBPOwner} INT UNSIGNED NOT NULL,\n{FieldBPITS} BLOB,\n{FieldBPVersion} INT DEFAULT 0,\n" +
|
||||
"{FieldBPLastUpdate} TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n" +
|
||||
|
Loading…
Reference in New Issue
Block a user