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:
Indyuce 2022-07-04 14:25:06 +02:00
commit 113b82ecfd
2 changed files with 17 additions and 1 deletions

View File

@ -7,6 +7,9 @@ import net.Indyuce.mmocore.manager.data.PlayerDataManager;
import net.Indyuce.mmocore.manager.data.yaml.YAMLGuildDataManager;
import org.bukkit.configuration.file.FileConfiguration;
import java.sql.SQLException;
import java.util.concurrent.CompletableFuture;
public class MySQLDataProvider extends MMODataSource implements DataProvider {
private final MySQLPlayerDataManager playerManager = new MySQLPlayerDataManager(this);
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,"
+ "attributes LONGTEXT,professions LONGTEXT,times_claimed LONGTEXT,quests 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

View File

@ -160,6 +160,7 @@ public class Party implements AbstractParty {
Request request = new PartyInvite(this, inviter, target);
new ConfigMessage("party-invite").addPlaceholders("player", inviter.getPlayer().getName(), "uuid", request.getUniqueId().toString())
.sendAsJSon(target.getPlayer());
MMOCore.plugin.requestManager.registerRequest(request);
}