Merge branch 'develop' into feature/dinnerbone-morph

This commit is contained in:
LCastr0 2016-12-22 17:09:33 -02:00
commit ac6440a3c6
15 changed files with 68 additions and 7 deletions

View File

@ -43,7 +43,7 @@
<dependency>
<groupId>com.mineplex</groupId>
<artifactId>anticheat</artifactId>
<version>1.2</version>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>

View File

@ -586,9 +586,8 @@ public class CommunityManager extends MiniDbClientPlugin<CommunityMemberData>
new CommunityUpdateMemberRole(community.getId(), sender.getName(), info.UUID.toString(), role.toString()).publish();
}
public void handleCreate(Player sender, String name)
public void handleCreate(Player sender, int accountId, String name)
{
int accountId = Managers.get(CoreClientManager.class).getAccountId(sender);
runAsync(() ->
{
_repo.createCommunity(name, accountId, id ->

View File

@ -20,6 +20,12 @@ public class CommunityChatCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 1)
{
UtilPlayer.message(caller, F.help("/com chat <community>", "Selects which community you chat to", Rank.ALL, ChatColor.AQUA));

View File

@ -33,6 +33,12 @@ public class CommunityCommand extends MultiCommandBase<CommunityManager>
@Override
protected void Help(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length > 0)
{
if (args[0].equalsIgnoreCase("help"))

View File

@ -6,6 +6,7 @@ import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import mineplex.core.Managers;
import mineplex.core.account.CoreClientManager;
import mineplex.core.chat.Chat;
import mineplex.core.command.CommandBase;
import mineplex.core.common.Rank;
@ -24,6 +25,12 @@ public class CommunityCreateCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 1)
{
UtilPlayer.message(caller, F.help("/com create <name>", "Creates a new community", Rank.ETERNAL, ChatColor.AQUA));
@ -52,13 +59,14 @@ public class CommunityCreateCommand extends CommandBase<CommunityManager>
}
Plugin.runAsync(() ->
{
int accountId = Managers.get(CoreClientManager.class).getAccountId(caller);
if (Managers.get(Chat.class).getFilteredMessage(caller, args[0]).contains("*"))
{
UtilPlayer.message(caller, F.main(Plugin.getName(), "That name is not allowed!"));
}
else
{
Plugin.handleCreate(caller, args[0]);
Plugin.handleCreate(caller, accountId, args[0]);
}
});
}

View File

@ -26,6 +26,12 @@ public class CommunityDescriptionCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 2)
{
UtilPlayer.message(caller, F.help("/com description <community> <description>", "Sets the description of a community you manage", Rank.ALL, ChatColor.AQUA));

View File

@ -24,6 +24,12 @@ public class CommunityDisbandCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 1)
{
UtilPlayer.message(caller, F.help("/com disband <community>", "Disbands a community you own", Rank.ETERNAL, ChatColor.AQUA));

View File

@ -24,6 +24,12 @@ public class CommunityInviteCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 2)
{
UtilPlayer.message(caller, F.help("/com invite <player> <community>", "Invites a player to a community you manage", Rank.ALL, ChatColor.AQUA));

View File

@ -21,6 +21,12 @@ public class CommunityJoinCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 1)
{
UtilPlayer.message(caller, F.help("/com join <community>", "Joins a community that is open or you have been invited to", Rank.ALL, ChatColor.AQUA));

View File

@ -25,6 +25,12 @@ public class CommunityMCSCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 1)
{
UtilPlayer.message(caller, F.help("/com mcs <community>", "Opens the Mineplex Community Server of a community you manage", Rank.ALL, ChatColor.AQUA));

View File

@ -27,6 +27,12 @@ public class CommunityRenameCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 2)
{
UtilPlayer.message(caller, F.help("/com rename <community> <name>", "Changes the name of a community you own", Rank.ETERNAL, ChatColor.AQUA));

View File

@ -24,6 +24,12 @@ public class CommunityUnInviteCommand extends CommandBase<CommunityManager>
@Override
public void Execute(Player caller, String[] args)
{
if (true)
{
caller.sendMessage(F.main("Communities", "Coming soon!"));
return;
}
if (args.length < 2)
{
UtilPlayer.message(caller, F.help("/com uninvite <player> <community>", "Revokes a player's invitation to a community you manage", Rank.ALL, ChatColor.AQUA));

View File

@ -409,7 +409,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan>implements IRelati
_bannerManager.loadBanners(this);
new PersonalServerManager(plugin, _clientManager).setUseInterfaceItem(false);
new CommunityManager(plugin, _clientManager);
// new CommunityManager(plugin, _clientManager);
Bukkit.getMessenger().registerOutgoingPluginChannel(plugin, "Replay|Restrict");

View File

@ -275,7 +275,7 @@ public class HubManager extends MiniClientPlugin<HubClient> implements IChatMess
new SalesAnnouncementManager(plugin);
new CommunityManager(plugin, _clientManager);
// new CommunityManager(plugin, _clientManager);
ScoreboardManager scoreboardManager = new ScoreboardManager(plugin)
{

View File

@ -407,7 +407,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation
addCommand(new TauntCommand(this));
new PersonalServerManager(plugin, _clientManager).setUseInterfaceItem(false);
new CommunityManager(plugin, _clientManager);
// new CommunityManager(plugin, _clientManager);
_scoreboardManager = new ScoreboardManager(_plugin)
{