IntelliJ Inspection Based Cleanup
This commit is contained in:
@@ -160,7 +160,7 @@ public class Econ
|
||||
|
||||
public static Set<MPlayer> getMPlayers(EconomyParticipator ep)
|
||||
{
|
||||
Set<MPlayer> mplayers = new HashSet<MPlayer>();
|
||||
Set<MPlayer> mplayers = new HashSet<>();
|
||||
|
||||
if (ep == null)
|
||||
{
|
||||
@@ -180,7 +180,7 @@ public class Econ
|
||||
|
||||
public static void sendTransferInfo(EconomyParticipator invoker, EconomyParticipator from, EconomyParticipator to, double amount)
|
||||
{
|
||||
Set<MPlayer> recipients = new HashSet<MPlayer>();
|
||||
Set<MPlayer> recipients = new HashSet<>();
|
||||
recipients.addAll(getMPlayers(invoker));
|
||||
recipients.addAll(getMPlayers(from));
|
||||
recipients.addAll(getMPlayers(to));
|
||||
|
@@ -49,7 +49,7 @@ public class EngineV19 extends Engine
|
||||
Entity thrower = (Entity)projectileSource;
|
||||
|
||||
// ... create a dummy list to avoid ConcurrentModificationException ...
|
||||
List<LivingEntity> affectedList = new ArrayList<LivingEntity>();
|
||||
List<LivingEntity> affectedList = new ArrayList<>();
|
||||
|
||||
// ... then scan through affected entities to make sure they're all valid targets ...
|
||||
for (LivingEntity affectedEntity : event.getAffectedEntities())
|
||||
|
@@ -97,7 +97,7 @@ public abstract class ChannelFactionsAbstract implements Channel
|
||||
@Override
|
||||
public Set<Chatter> getMembers()
|
||||
{
|
||||
Set<Chatter> ret = new HashSet<Chatter>();
|
||||
Set<Chatter> ret = new HashSet<>();
|
||||
for (Chatter chatter : Herochat.getChatterManager().getChatters())
|
||||
{
|
||||
if(chatter.hasChannel(this)) ret.add(chatter);
|
||||
@@ -200,7 +200,7 @@ public abstract class ChannelFactionsAbstract implements Channel
|
||||
{
|
||||
message = this.applyFormat(this.getFormatSupplier().getEmoteFormat(), "").replace("%2$s", message);
|
||||
|
||||
Set<Player> recipients = new HashSet<Player>();
|
||||
Set<Player> recipients = new HashSet<>();
|
||||
for (Chatter member : this.getMembers())
|
||||
{
|
||||
recipients.add(member.getPlayer());
|
||||
@@ -225,7 +225,7 @@ public abstract class ChannelFactionsAbstract implements Channel
|
||||
|
||||
public Set<Player> getRecipients(Player sender)
|
||||
{
|
||||
Set<Player> ret = new HashSet<Player>();
|
||||
Set<Player> ret = new HashSet<>();
|
||||
|
||||
MPlayer fsender = MPlayer.get(sender);
|
||||
Faction faction = fsender.getFaction();
|
||||
|
@@ -28,7 +28,7 @@ public class ChannelFactionsFaction extends ChannelFactionsAbstract
|
||||
@Override public void setDistance(int distance) { MConf.get().herochatFactionDistance = distance; }
|
||||
|
||||
@Override public void addWorld(String world) { MConf.get().herochatFactionWorlds.add(world); }
|
||||
@Override public Set<String> getWorlds() { return new HashSet<String>(MConf.get().herochatFactionWorlds); }
|
||||
@Override public Set<String> getWorlds() { return new HashSet<>(MConf.get().herochatFactionWorlds); }
|
||||
@Override public void setWorlds(Set<String> worlds) { MConf.get().herochatFactionWorlds = worlds; }
|
||||
|
||||
@Override public boolean isShortcutAllowed() { return MConf.get().herochatFactionIsShortcutAllowed; }
|
||||
|
@@ -128,7 +128,7 @@ public class EngineWorldGuard extends Engine
|
||||
ProtectedCuboidRegion region = new ProtectedCuboidRegion(regionName, minChunk, maxChunk);
|
||||
|
||||
Map<String, ProtectedRegion> regionMap = regionManager.getRegions();
|
||||
List<ProtectedRegion> regionList = new ArrayList<ProtectedRegion>(regionMap.values());
|
||||
List<ProtectedRegion> regionList = new ArrayList<>(regionMap.values());
|
||||
|
||||
// Let's find what we've overlapped
|
||||
List<ProtectedRegion> overlapRegions = region.getIntersectingRegions(regionList);
|
||||
|
Reference in New Issue
Block a user