Fix error caused by GIT client with MCS themes and actually register redis commands in the miniplugin
This commit is contained in:
parent
cbe1a617af
commit
095fbfa255
@ -30,21 +30,33 @@ import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.communities.Community.PrivacySetting;
|
||||
import mineplex.core.communities.commands.CommunityCommand;
|
||||
import mineplex.core.communities.redis.CommunityChat;
|
||||
import mineplex.core.communities.redis.CommunityChatHandler;
|
||||
import mineplex.core.communities.redis.CommunityCloseJoinRequest;
|
||||
import mineplex.core.communities.redis.CommunityCloseJoinRequestHandler;
|
||||
import mineplex.core.communities.redis.CommunityCreate;
|
||||
import mineplex.core.communities.redis.CommunityCreateHandler;
|
||||
import mineplex.core.communities.redis.CommunityDisband;
|
||||
import mineplex.core.communities.redis.CommunityDisbandHandler;
|
||||
import mineplex.core.communities.redis.CommunityInvite;
|
||||
import mineplex.core.communities.redis.CommunityInviteHandler;
|
||||
import mineplex.core.communities.redis.CommunityJoinRequest;
|
||||
import mineplex.core.communities.redis.CommunityJoinRequestHandler;
|
||||
import mineplex.core.communities.redis.CommunityUnInvite;
|
||||
import mineplex.core.communities.redis.CommunityUnInviteHandler;
|
||||
import mineplex.core.communities.redis.CommunityUpdateMemberRole;
|
||||
import mineplex.core.communities.redis.CommunityUpdateMemberRoleHandler;
|
||||
import mineplex.core.communities.redis.CommunityUpdateMembership;
|
||||
import mineplex.core.communities.redis.CommunityUpdateMembershipHandler;
|
||||
import mineplex.core.communities.redis.CommunityUpdateName;
|
||||
import mineplex.core.communities.redis.CommunityUpdateNameHandler;
|
||||
import mineplex.core.communities.redis.CommunityUpdateSetting;
|
||||
import mineplex.core.communities.redis.CommunityUpdateSettingHandler;
|
||||
import mineplex.core.communities.storage.CommunityRepository;
|
||||
import mineplex.core.preferences.Preference;
|
||||
import mineplex.core.preferences.PreferencesManager;
|
||||
import mineplex.core.recharge.Recharge;
|
||||
import mineplex.serverdata.Region;
|
||||
import mineplex.serverdata.commands.ServerCommandManager;
|
||||
import mineplex.serverdata.data.DataRepository;
|
||||
import mineplex.serverdata.data.PlayerStatus;
|
||||
import mineplex.serverdata.redis.RedisDataRepository;
|
||||
@ -102,6 +114,18 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
|
||||
_repo.loadCommunities(_loadedCommunities);
|
||||
|
||||
addCommand(new CommunityCommand(this));
|
||||
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityChat.class, new CommunityChatHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityCloseJoinRequest.class, new CommunityCloseJoinRequestHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityCreate.class, new CommunityCreateHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityDisband.class, new CommunityDisbandHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityInvite.class, new CommunityInviteHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityJoinRequest.class, new CommunityJoinRequestHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityUnInvite.class, new CommunityUnInviteHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityUpdateMemberRole.class, new CommunityUpdateMemberRoleHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityUpdateMembership.class, new CommunityUpdateMembershipHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityUpdateName.class, new CommunityUpdateNameHandler(this));
|
||||
ServerCommandManager.getInstance().registerCommandType(CommunityUpdateSetting.class, new CommunityUpdateSettingHandler(this));
|
||||
}
|
||||
|
||||
private void cycleBrowser()
|
||||
|
@ -1,4 +1,4 @@
|
||||
package mineplex.core.communities.mps;
|
||||
package mineplex.core.communities.mcs;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
package mineplex.core.communities.mps;
|
||||
|
||||
import org.bukkit.Material;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
|
||||
public enum MPSTheme
|
||||
{
|
||||
CANDYLAND(1, C.cPurple + "Candyland", Material.COOKIE, 1000, "Lobby_MPS_Candyland.zip")
|
||||
;
|
||||
|
||||
private final int _id;
|
||||
private final String _displayName, _file;
|
||||
private final Material _displayType;
|
||||
private final int _cost;
|
||||
|
||||
private MPSTheme(int id, String displayName, Material displayType, int cost, String file)
|
||||
{
|
||||
_id = id;
|
||||
_displayName = displayName;
|
||||
_displayType = displayType;
|
||||
_cost = cost;
|
||||
_file = file;
|
||||
}
|
||||
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
public String getDisplayName()
|
||||
{
|
||||
return _displayName;
|
||||
}
|
||||
|
||||
public Material getDisplayType()
|
||||
{
|
||||
return _displayType;
|
||||
}
|
||||
|
||||
public int getCost()
|
||||
{
|
||||
return _cost;
|
||||
}
|
||||
|
||||
public String getFile()
|
||||
{
|
||||
return _file;
|
||||
}
|
||||
}
|
@ -27,8 +27,7 @@ import mineplex.serverdata.database.column.ColumnVarChar;
|
||||
|
||||
public class CommunityRepository extends MinecraftRepository
|
||||
{
|
||||
//private static final String GET_TWO = "SELECT c.id, cm.clanRole FROM clans c WHERE (SELECT COUNT(id) AS idTotal FROM accountClan WHERE clanId=clans.id) > 5 INNER JOIN accountClan cm ON c.id=cm.clanId;";
|
||||
private static final String GET_ALL_COMMUNITIES = /*Revise Query*/"SELECT * FROM communities;";//"SELECT * FROM communities WHERE (SELECT COUNT(id) AS idTotal FROM communityMembers WHERE communityId=communities.id) > 5;";
|
||||
private static final String GET_ALL_COMMUNITIES = "SELECT * FROM communities;";
|
||||
private static final String GET_COMMUNITY_BY_ID = "SELECT * FROM communities WHERE id=?;";
|
||||
private static final String GET_COMMUNITY_BY_NAME = "SELECT * FROM communities WHERE name=?;";
|
||||
private static final String GET_COMMUNITY_MEMBERS = "SELECT cm.accountId, cm.communityRole, ac.name, ac.uuid, ac.lastLogin, now() FROM communityMembers cm INNER JOIN accounts ac ON ac.id=cm.accountId WHERE communityId=?;";
|
||||
|
Loading…
Reference in New Issue
Block a user