forked from Upstream/mmocore
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/net/Indyuce/mmocore/gui/AttributeView.java # src/main/java/net/Indyuce/mmocore/gui/PlayerStats.java
This commit is contained in:
commit
113b82ecfd
@ -7,6 +7,9 @@ import net.Indyuce.mmocore.manager.data.PlayerDataManager;
|
|||||||
import net.Indyuce.mmocore.manager.data.yaml.YAMLGuildDataManager;
|
import net.Indyuce.mmocore.manager.data.yaml.YAMLGuildDataManager;
|
||||||
import org.bukkit.configuration.file.FileConfiguration;
|
import org.bukkit.configuration.file.FileConfiguration;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
public class MySQLDataProvider extends MMODataSource implements DataProvider {
|
public class MySQLDataProvider extends MMODataSource implements DataProvider {
|
||||||
private final MySQLPlayerDataManager playerManager = new MySQLPlayerDataManager(this);
|
private final MySQLPlayerDataManager playerManager = new MySQLPlayerDataManager(this);
|
||||||
private final YAMLGuildDataManager guildManager = new YAMLGuildDataManager();
|
private final YAMLGuildDataManager guildManager = new YAMLGuildDataManager();
|
||||||
@ -42,7 +45,19 @@ getResultAsync("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '"
|
|||||||
+ "experience INT(11) DEFAULT 0,class VARCHAR(20),guild VARCHAR(20),last_login LONG,"
|
+ "experience INT(11) DEFAULT 0,class VARCHAR(20),guild VARCHAR(20),last_login LONG,"
|
||||||
+ "attributes LONGTEXT,professions LONGTEXT,times_claimed LONGTEXT,quests LONGTEXT,"
|
+ "attributes LONGTEXT,professions LONGTEXT,times_claimed LONGTEXT,quests LONGTEXT,"
|
||||||
+ "waypoints LONGTEXT,friends LONGTEXT,skills LONGTEXT,bound_skills LONGTEXT,"
|
+ "waypoints LONGTEXT,friends LONGTEXT,skills LONGTEXT,bound_skills LONGTEXT,"
|
||||||
+ "class_info LONGTEXT,is_saved INT(1), PRIMARY KEY (uuid));");
|
+ "class_info LONGTEXT, is_saved TINYINT, PRIMARY KEY (uuid));");
|
||||||
|
|
||||||
|
|
||||||
|
getResult("SELECT * FROM information_schema.COLUMNS WHERE TABLE_NAME = 'mmocore_playerdata'" +
|
||||||
|
" AND COLUMN_NAME = 'is_saved'",(result)-> {
|
||||||
|
try {
|
||||||
|
if(!result.next())
|
||||||
|
executeUpdate("ALTER TABLE mmocore_playerdata ADD COLUMN is_saved TINYINT");
|
||||||
|
} catch (SQLException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -160,6 +160,7 @@ public class Party implements AbstractParty {
|
|||||||
Request request = new PartyInvite(this, inviter, target);
|
Request request = new PartyInvite(this, inviter, target);
|
||||||
new ConfigMessage("party-invite").addPlaceholders("player", inviter.getPlayer().getName(), "uuid", request.getUniqueId().toString())
|
new ConfigMessage("party-invite").addPlaceholders("player", inviter.getPlayer().getName(), "uuid", request.getUniqueId().toString())
|
||||||
.sendAsJSon(target.getPlayer());
|
.sendAsJSon(target.getPlayer());
|
||||||
|
|
||||||
MMOCore.plugin.requestManager.registerRequest(request);
|
MMOCore.plugin.requestManager.registerRequest(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user