Merge branch 'feature/party-v2' into develop
This commit is contained in:
commit
dc96258055
@ -36,8 +36,6 @@ public class PartyEventListener implements Listener
|
|||||||
{
|
{
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
|
|
||||||
|
|
||||||
String partyName = _plugin.getInviteManager().getPartyWaiting(player.getUniqueId());
|
String partyName = _plugin.getInviteManager().getPartyWaiting(player.getUniqueId());
|
||||||
|
|
||||||
if (partyName == null)
|
if (partyName == null)
|
||||||
|
@ -43,13 +43,6 @@ public class PartyMethodManager
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size();
|
|
||||||
if(!can)
|
|
||||||
{
|
|
||||||
Lang.SERVER_FULL.send(caller);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(party != null)
|
if(party != null)
|
||||||
{
|
{
|
||||||
if(!party.getOwner().equalsIgnoreCase(caller.getName()))
|
if(!party.getOwner().equalsIgnoreCase(caller.getName()))
|
||||||
@ -115,6 +108,14 @@ public class PartyMethodManager
|
|||||||
_plugin.getInviteManager().sendAcceptOrDeny(possible, caller.getName());
|
_plugin.getInviteManager().sendAcceptOrDeny(possible, caller.getName());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//Only perform this when I actually need to.
|
||||||
|
boolean can = Bukkit.getMaxPlayers() >= _plugin.getPlugin().getServer().getOnlinePlayers().size();
|
||||||
|
if(!can)
|
||||||
|
{
|
||||||
|
Lang.SERVER_FULL.send(caller);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Not on the same server
|
//Not on the same server
|
||||||
_plugin.getRedisManager().findAndInvite(target, caller.getName());
|
_plugin.getRedisManager().findAndInvite(target, caller.getName());
|
||||||
}
|
}
|
||||||
|
@ -515,6 +515,9 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
|||||||
//Add Self to Other
|
//Add Self to Other
|
||||||
otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player);
|
otherPlayer.getScoreboard().getTeam(rankName).addPlayer(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//only give it in the hub
|
||||||
|
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -587,7 +590,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
|||||||
if (rank != Rank.ALL)
|
if (rank != Rank.ALL)
|
||||||
rankStr = rank.getTag(true, true) + " ";
|
rankStr = rank.getTag(true, true) + " ";
|
||||||
//Party Chat
|
//Party Chat
|
||||||
if (event.getMessage().charAt(0) == '#')
|
if (event.getMessage().charAt(0) == '@')
|
||||||
{
|
{
|
||||||
Party party = _partyManager.getParty(player);
|
Party party = _partyManager.getParty(player);
|
||||||
if (party != null)
|
if (party != null)
|
||||||
|
@ -1,13 +1,39 @@
|
|||||||
package nautilus.game.arcade.game.games.draw;
|
package nautilus.game.arcade.game.games.draw;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import mineplex.core.common.util.C;
|
||||||
import java.util.Arrays;
|
import mineplex.core.common.util.F;
|
||||||
import java.util.Collection;
|
import mineplex.core.common.util.UtilAlg;
|
||||||
import java.util.Collections;
|
import mineplex.core.common.util.UtilBlock;
|
||||||
import java.util.HashSet;
|
import mineplex.core.common.util.UtilBlockText;
|
||||||
import java.util.Iterator;
|
import mineplex.core.common.util.UtilBlockText.TextAlign;
|
||||||
import java.util.List;
|
import mineplex.core.common.util.UtilGear;
|
||||||
|
import mineplex.core.common.util.UtilInv;
|
||||||
|
import mineplex.core.common.util.UtilMath;
|
||||||
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
|
import mineplex.core.common.util.UtilServer;
|
||||||
|
import mineplex.core.common.util.UtilTextBottom;
|
||||||
|
import mineplex.core.common.util.UtilTime;
|
||||||
|
import mineplex.core.itemstack.ItemStackFactory;
|
||||||
|
import mineplex.core.recharge.Recharge;
|
||||||
|
import mineplex.core.updater.UpdateType;
|
||||||
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
|
import nautilus.game.arcade.ArcadeManager;
|
||||||
|
import nautilus.game.arcade.GameType;
|
||||||
|
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||||
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
|
import nautilus.game.arcade.game.SoloGame;
|
||||||
|
import nautilus.game.arcade.game.games.GameScore;
|
||||||
|
import nautilus.game.arcade.game.games.draw.kits.KitArtist;
|
||||||
|
import nautilus.game.arcade.game.games.draw.tools.Tool;
|
||||||
|
import nautilus.game.arcade.game.games.draw.tools.ToolCircle;
|
||||||
|
import nautilus.game.arcade.game.games.draw.tools.ToolLine;
|
||||||
|
import nautilus.game.arcade.game.games.draw.tools.ToolSquare;
|
||||||
|
import nautilus.game.arcade.kit.Kit;
|
||||||
|
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||||
|
import nautilus.game.arcade.stats.DrawGuessStatTracker;
|
||||||
|
import nautilus.game.arcade.stats.KeenEyeStatTracker;
|
||||||
|
import nautilus.game.arcade.stats.MrSquiggleStatTracker;
|
||||||
|
import nautilus.game.arcade.stats.PureLuckStatTracker;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.GameMode;
|
import org.bukkit.GameMode;
|
||||||
@ -26,38 +52,13 @@ import org.bukkit.event.player.PlayerInteractEvent;
|
|||||||
import org.bukkit.event.player.PlayerMoveEvent;
|
import org.bukkit.event.player.PlayerMoveEvent;
|
||||||
import org.bukkit.event.player.PlayerQuitEvent;
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
import mineplex.core.common.util.C;
|
import java.util.ArrayList;
|
||||||
import mineplex.core.common.util.F;
|
import java.util.Arrays;
|
||||||
import mineplex.core.common.util.UtilAlg;
|
import java.util.Collection;
|
||||||
import mineplex.core.common.util.UtilBlock;
|
import java.util.Collections;
|
||||||
|
import java.util.HashSet;
|
||||||
import mineplex.core.common.util.UtilGear;
|
import java.util.Iterator;
|
||||||
import mineplex.core.common.util.UtilInv;
|
import java.util.List;
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
|
||||||
import mineplex.core.common.util.UtilServer;
|
|
||||||
import mineplex.core.common.util.UtilBlockText;
|
|
||||||
import mineplex.core.common.util.UtilTextBottom;
|
|
||||||
import mineplex.core.common.util.UtilTime;
|
|
||||||
import mineplex.core.common.util.UtilBlockText.TextAlign;
|
|
||||||
import mineplex.core.itemstack.ItemStackFactory;
|
|
||||||
import mineplex.core.recharge.Recharge;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import nautilus.game.arcade.ArcadeManager;
|
|
||||||
import nautilus.game.arcade.GameType;
|
|
||||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
|
||||||
import nautilus.game.arcade.game.GameTeam;
|
|
||||||
import nautilus.game.arcade.game.SoloGame;
|
|
||||||
import nautilus.game.arcade.game.games.GameScore;
|
|
||||||
import nautilus.game.arcade.game.games.draw.kits.*;
|
|
||||||
import nautilus.game.arcade.game.games.draw.tools.*;
|
|
||||||
import nautilus.game.arcade.kit.Kit;
|
|
||||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
|
||||||
import nautilus.game.arcade.stats.DrawGuessStatTracker;
|
|
||||||
import nautilus.game.arcade.stats.KeenEyeStatTracker;
|
|
||||||
import nautilus.game.arcade.stats.MrSquiggleStatTracker;
|
|
||||||
import nautilus.game.arcade.stats.PureLuckStatTracker;
|
|
||||||
|
|
||||||
public class Draw extends SoloGame
|
public class Draw extends SoloGame
|
||||||
{
|
{
|
||||||
@ -211,7 +212,6 @@ public class Draw extends SoloGame
|
|||||||
new ChatStatData("PureLuck", "Lucky Guess'", true)
|
new ChatStatData("PureLuck", "Lucky Guess'", true)
|
||||||
);
|
);
|
||||||
|
|
||||||
Manager.GetChat().setThreeSecondDelay(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,31 +1,5 @@
|
|||||||
package nautilus.game.arcade.game.games.typewars;
|
package nautilus.game.arcade.game.games.typewars;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.Sound;
|
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.entity.Giant;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.entity.EntityDeathEvent;
|
|
||||||
import org.bukkit.event.entity.EntitySpawnEvent;
|
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
|
||||||
import org.bukkit.event.player.PlayerChatEvent;
|
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
|
||||||
import org.bukkit.event.player.PlayerInteractEvent;
|
|
||||||
import org.bukkit.inventory.ItemStack;
|
|
||||||
import org.bukkit.inventory.meta.LeatherArmorMeta;
|
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
@ -67,8 +41,32 @@ import nautilus.game.arcade.gametutorial.events.GameTutorialEndEvent;
|
|||||||
import nautilus.game.arcade.gametutorial.events.GameTutorialStartEvent;
|
import nautilus.game.arcade.gametutorial.events.GameTutorialStartEvent;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import nautilus.game.arcade.managers.chat.ChatStatData;
|
import nautilus.game.arcade.managers.chat.ChatStatData;
|
||||||
import nautilus.game.arcade.stats.TimeInGameStatTracker;
|
|
||||||
import nautilus.game.arcade.world.WorldData;
|
import nautilus.game.arcade.world.WorldData;
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.Sound;
|
||||||
|
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
|
import org.bukkit.entity.Giant;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.EventPriority;
|
||||||
|
import org.bukkit.event.entity.EntityDeathEvent;
|
||||||
|
import org.bukkit.event.entity.EntitySpawnEvent;
|
||||||
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
import org.bukkit.event.player.PlayerInteractEvent;
|
||||||
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.inventory.meta.LeatherArmorMeta;
|
||||||
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
public class TypeWars extends TeamGame
|
public class TypeWars extends TeamGame
|
||||||
{
|
{
|
||||||
@ -175,7 +173,6 @@ public class TypeWars extends TeamGame
|
|||||||
);
|
);
|
||||||
|
|
||||||
manager.GetCreature().SetDisableCustomDrops(true);
|
manager.GetCreature().SetDisableCustomDrops(true);
|
||||||
manager.GetChat().setThreeSecondDelay(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
@ -993,7 +990,6 @@ public class TypeWars extends TeamGame
|
|||||||
|
|
||||||
//End
|
//End
|
||||||
Manager.GetCreature().SetDisableCustomDrops(false);
|
Manager.GetCreature().SetDisableCustomDrops(false);
|
||||||
Manager.GetChat().setThreeSecondDelay(true);
|
|
||||||
SetState(GameState.End);
|
SetState(GameState.End);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,24 +1,5 @@
|
|||||||
package nautilus.game.arcade.managers;
|
package nautilus.game.arcade.managers;
|
||||||
|
|
||||||
import java.lang.reflect.Array;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
|
||||||
import java.lang.reflect.Type;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.bukkit.ChatColor;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.Player;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.HandlerList;
|
|
||||||
import org.bukkit.event.Listener;
|
|
||||||
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
import mineplex.core.common.util.UtilMath;
|
||||||
import mineplex.core.common.util.UtilServer;
|
import mineplex.core.common.util.UtilServer;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
@ -33,6 +14,23 @@ import nautilus.game.arcade.GameType;
|
|||||||
import nautilus.game.arcade.game.Game;
|
import nautilus.game.arcade.game.Game;
|
||||||
import nautilus.game.arcade.game.Game.GameState;
|
import nautilus.game.arcade.game.Game.GameState;
|
||||||
import nautilus.game.arcade.stats.StatTracker;
|
import nautilus.game.arcade.stats.StatTracker;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.EventHandler;
|
||||||
|
import org.bukkit.event.HandlerList;
|
||||||
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.lang.reflect.Type;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class GameCreationManager implements Listener
|
public class GameCreationManager implements Listener
|
||||||
{
|
{
|
||||||
@ -175,7 +173,6 @@ public class GameCreationManager implements Listener
|
|||||||
// Manager.GetAntiStack().SetEnabled(true);
|
// Manager.GetAntiStack().SetEnabled(true);
|
||||||
Manager.getCosmeticManager().setHideParticles(false);
|
Manager.getCosmeticManager().setHideParticles(false);
|
||||||
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.CustomWeaponName);
|
Manager.GetDamage().GetCombatManager().setUseWeaponName(AttackReason.CustomWeaponName);
|
||||||
Manager.GetChat().setThreeSecondDelay(true);
|
|
||||||
ItemStackFactory.Instance.SetUseCustomNames(false);
|
ItemStackFactory.Instance.SetUseCustomNames(false);
|
||||||
|
|
||||||
HashMap<String, ChatColor> pastTeams = null;
|
HashMap<String, ChatColor> pastTeams = null;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
package nautilus.game.arcade.managers;
|
package nautilus.game.arcade.managers;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import mineplex.core.common.Rank;
|
import mineplex.core.common.Rank;
|
||||||
import mineplex.core.common.util.C;
|
import mineplex.core.common.util.C;
|
||||||
import mineplex.core.common.util.F;
|
import mineplex.core.common.util.F;
|
||||||
@ -9,6 +7,7 @@ import mineplex.core.common.util.UtilMath;
|
|||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilTabTitle;
|
import mineplex.core.common.util.UtilTabTitle;
|
||||||
import mineplex.core.common.util.UtilTime;
|
import mineplex.core.common.util.UtilTime;
|
||||||
|
import mineplex.core.party.PartyManager;
|
||||||
import mineplex.core.recharge.Recharge;
|
import mineplex.core.recharge.Recharge;
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
@ -23,7 +22,6 @@ import nautilus.game.arcade.game.Game.GameState;
|
|||||||
import nautilus.game.arcade.game.GameTeam;
|
import nautilus.game.arcade.game.GameTeam;
|
||||||
import nautilus.game.arcade.kit.Kit;
|
import nautilus.game.arcade.kit.Kit;
|
||||||
import nautilus.game.arcade.kit.ProgressingKit;
|
import nautilus.game.arcade.kit.ProgressingKit;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -41,6 +39,8 @@ import org.bukkit.event.player.PlayerJoinEvent;
|
|||||||
import org.bukkit.event.player.PlayerRespawnEvent;
|
import org.bukkit.event.player.PlayerRespawnEvent;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class GamePlayerManager implements Listener
|
public class GamePlayerManager implements Listener
|
||||||
{
|
{
|
||||||
ArcadeManager Manager;
|
ArcadeManager Manager;
|
||||||
@ -154,6 +154,7 @@ public class GamePlayerManager implements Listener
|
|||||||
player.sendMessage(F.main("Kit", "No default kit found for " + C.cGreenB + Manager.GetGame().GetName()));
|
player.sendMessage(F.main("Kit", "No default kit found for " + C.cGreenB + Manager.GetGame().GetName()));
|
||||||
}
|
}
|
||||||
}.runTaskLater(Manager.getPlugin(), 10L);
|
}.runTaskLater(Manager.getPlugin(), 10L);
|
||||||
|
player.getInventory().setItem(PartyManager.INTERFACE_SLOT, PartyManager.INTERFACE_ITEM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ public class GameChatManager implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Party Chat
|
//Party Chat
|
||||||
if (event.getMessage().charAt(0) == '#')
|
if (event.getMessage().charAt(0) == '@')
|
||||||
{
|
{
|
||||||
Party party = _manager.getPartyManager().getParty(sender);
|
Party party = _manager.getPartyManager().getParty(sender);
|
||||||
if (party != null)
|
if (party != null)
|
||||||
@ -186,7 +186,7 @@ public class GameChatManager implements Listener
|
|||||||
|
|
||||||
if (team != null)
|
if (team != null)
|
||||||
{
|
{
|
||||||
boolean isPriv = event.getMessage().charAt(0) == '@';
|
boolean isPriv = event.getMessage().charAt(0) == '#';
|
||||||
|
|
||||||
if(isPriv)
|
if(isPriv)
|
||||||
event.setMessage(event.getMessage().substring(1, event.getMessage().length()));
|
event.setMessage(event.getMessage().substring(1, event.getMessage().length()));
|
||||||
|
Loading…
Reference in New Issue
Block a user