IntelliJ Inspection Based Cleanup

This commit is contained in:
Olof Larsson
2017-03-24 14:03:29 +01:00
parent 60b4472735
commit bdbc1c79a2
53 changed files with 154 additions and 153 deletions

View File

@@ -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();

View File

@@ -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; }