Merge pull request #131 in MIN/mineplex from md_5/suspicious to develop
* commit '4927bb8c0b6b1fcebe41adf9f38489fe82116cfa': Fix some misc suspicious calls to Collection methods.
This commit is contained in:
commit
359655f417
@ -80,7 +80,7 @@ public class CustomTagFix extends MiniPlugin implements IPacketHandler, NCPHook
|
|||||||
_entityMap.remove(event.getPlayer().getName());
|
_entityMap.remove(event.getPlayer().getName());
|
||||||
_entityNameMap.remove(event.getPlayer().getName());
|
_entityNameMap.remove(event.getPlayer().getName());
|
||||||
_entityRiding.remove(event.getPlayer().getName());
|
_entityRiding.remove(event.getPlayer().getName());
|
||||||
_loggedIn.remove(event.getPlayer());
|
_loggedIn.remove(event.getPlayer().getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW)
|
@EventHandler(priority = EventPriority.LOW)
|
||||||
|
@ -136,7 +136,7 @@ public class ObserverManager extends MiniPlugin
|
|||||||
if (_observerMap.containsKey(event.getPlayer()))
|
if (_observerMap.containsKey(event.getPlayer()))
|
||||||
{
|
{
|
||||||
restore(event.getPlayer(), _observerMap.get(event.getPlayer()));
|
restore(event.getPlayer(), _observerMap.get(event.getPlayer()));
|
||||||
_observerMap.remove(_plugin);
|
_observerMap.remove(event.getPlayer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,16 +296,6 @@ public class ServerManager extends MiniPlugin
|
|||||||
return timeLeft;
|
return timeLeft;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeServer(String serverName)
|
|
||||||
{
|
|
||||||
for (String key : _serverKeyInfoMap.keySet())
|
|
||||||
{
|
|
||||||
_serverKeyInfoMap.get(key).remove(serverName);
|
|
||||||
}
|
|
||||||
|
|
||||||
_serverInfoMap.remove(serverName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addServerGroup(ServerGroup serverGroup)
|
public void addServerGroup(ServerGroup serverGroup)
|
||||||
{
|
{
|
||||||
_serverKeyInfoMap.put(serverGroup.getPrefix(), new HashSet<ServerInfo>());
|
_serverKeyInfoMap.put(serverGroup.getPrefix(), new HashSet<ServerInfo>());
|
||||||
|
@ -356,12 +356,10 @@ public class CustomExplosion extends Explosion
|
|||||||
|
|
||||||
if (_fallingBlockExplosion)
|
if (_fallingBlockExplosion)
|
||||||
{
|
{
|
||||||
Collection<org.bukkit.block.Block> blocks = event.GetBlocks();
|
List<org.bukkit.block.Block> blocks = new ArrayList<>(event.GetBlocks());
|
||||||
|
|
||||||
if (blocks.size() > _maxFallingBlocks)
|
if (blocks.size() > _maxFallingBlocks)
|
||||||
{
|
{
|
||||||
blocks = new ArrayList<org.bukkit.block.Block>(blocks);
|
|
||||||
|
|
||||||
Collections.shuffle((ArrayList) blocks);
|
Collections.shuffle((ArrayList) blocks);
|
||||||
|
|
||||||
int toRemove = blocks.size() - _maxFallingBlocks;
|
int toRemove = blocks.size() - _maxFallingBlocks;
|
||||||
|
Loading…
Reference in New Issue
Block a user