From 18b10ce8f903b0dd9b7e1015d771a5309f133ceb Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 13 Mar 2012 08:27:03 -0500 Subject: [PATCH] Cleaning sweep, mainly for various stray "4 spaces" indentions to tabs --- src/com/massivecraft/factions/Conf.java | 2 +- .../massivecraft/factions/cmd/CmdCreate.java | 12 +- .../massivecraft/factions/cmd/CmdLock.java | 4 +- .../factions/cmd/CmdUnclaimall.java | 2 +- .../factions/event/FactionCreateEvent.java | 74 ++++++------- .../factions/event/FactionDisbandEvent.java | 80 +++++++------- .../factions/event/FactionRelationEvent.java | 76 ++++++------- .../factions/event/FactionRenameEvent.java | 103 +++++++++--------- .../factions/event/LandClaimEvent.java | 15 ++- .../factions/event/LandUnclaimAllEvent.java | 47 +++----- .../factions/event/LandUnclaimEvent.java | 40 +++---- .../listeners/FactionsEntityListener.java | 4 +- .../listeners/FactionsPlayerListener.java | 14 +-- .../factions/struct/ChatMode.java | 6 +- .../factions/struct/Permission.java | 2 +- .../factions/util/AsciiCompass.java | 6 +- .../factions/zcore/util/DiscUtil.java | 4 +- .../factions/zcore/util/TextUtil.java | 76 ++++++------- 18 files changed, 278 insertions(+), 289 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index a1b4a728..5ae19fad 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -36,7 +36,7 @@ public class Conf public static double powerPerMinute = 0.2; // Default health rate... it takes 5 min to heal one power public static double powerPerDeath = 4.0; // A death makes you lose 4 power public static boolean scaleNegativePower = false; // Power regeneration rate increase as power decreases - public static double scaleNegativeDivisor = 40.0; // Divisor for inverse power regeneration curve + public static double scaleNegativeDivisor = 40.0; // Divisor for inverse power regeneration curve public static boolean powerRegenOffline = false; // does player power regenerate even while they're offline? public static double powerOfflineLossPerDay = 0.0; // players will lose this much power per day offline public static double powerOfflineLossLimit = 0.0; // players will no longer lose power from being offline once their power drops to this amount or less diff --git a/src/com/massivecraft/factions/cmd/CmdCreate.java b/src/com/massivecraft/factions/cmd/CmdCreate.java index 1babc225..91fc632e 100644 --- a/src/com/massivecraft/factions/cmd/CmdCreate.java +++ b/src/com/massivecraft/factions/cmd/CmdCreate.java @@ -76,14 +76,14 @@ public class CmdCreate extends FCommand } // finish setting up the Faction - faction.setTag(tag); + faction.setTag(tag); - // trigger the faction join event for the creator - FPlayerJoinEvent joinEvent = new FPlayerJoinEvent(FPlayers.i.get(me),faction,FPlayerJoinEvent.PlayerJoinReason.CREATE); - Bukkit.getServer().getPluginManager().callEvent(joinEvent); - // join event cannot be cancelled or you'll have an empty faction + // trigger the faction join event for the creator + FPlayerJoinEvent joinEvent = new FPlayerJoinEvent(FPlayers.i.get(me),faction,FPlayerJoinEvent.PlayerJoinReason.CREATE); + Bukkit.getServer().getPluginManager().callEvent(joinEvent); + // join event cannot be cancelled or you'll have an empty faction - // finish setting up the FPlayer + // finish setting up the FPlayer fme.setRole(Rel.LEADER); fme.setFaction(faction); diff --git a/src/com/massivecraft/factions/cmd/CmdLock.java b/src/com/massivecraft/factions/cmd/CmdLock.java index cae5dbb1..ff638df6 100644 --- a/src/com/massivecraft/factions/cmd/CmdLock.java +++ b/src/com/massivecraft/factions/cmd/CmdLock.java @@ -7,8 +7,8 @@ public class CmdLock extends FCommand { // TODO: This solution needs refactoring. /* factions.lock: - description: use the /f lock [on/off] command to temporarily lock the data files from being overwritten - default: op + description: use the /f lock [on/off] command to temporarily lock the data files from being overwritten + default: op */ public CmdLock() diff --git a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java index 850ca5e2..0c7049a3 100644 --- a/src/com/massivecraft/factions/cmd/CmdUnclaimall.java +++ b/src/com/massivecraft/factions/cmd/CmdUnclaimall.java @@ -46,7 +46,7 @@ public class CmdUnclaimall extends FCommand } LandUnclaimAllEvent unclaimAllEvent = new LandUnclaimAllEvent(myFaction, fme); - Bukkit.getServer().getPluginManager().callEvent(unclaimAllEvent); + Bukkit.getServer().getPluginManager().callEvent(unclaimAllEvent); // this event cannot be cancelled Board.unclaimAll(myFaction.getId()); diff --git a/src/com/massivecraft/factions/event/FactionCreateEvent.java b/src/com/massivecraft/factions/event/FactionCreateEvent.java index 088e0021..5732699b 100644 --- a/src/com/massivecraft/factions/event/FactionCreateEvent.java +++ b/src/com/massivecraft/factions/event/FactionCreateEvent.java @@ -17,47 +17,47 @@ public class FactionCreateEvent extends Event implements Cancellable private Player sender; private boolean cancelled; - public FactionCreateEvent(Player sender, String tag) - { - this.factionTag = tag; - this.sender = sender; - this.cancelled = false; - } + public FactionCreateEvent(Player sender, String tag) + { + this.factionTag = tag; + this.sender = sender; + this.cancelled = false; + } - public FPlayer getFPlayer() - { - return FPlayers.i.get(sender); - } - - public String getFactionId() - { - return Factions.i.getNextId(); - } + public FPlayer getFPlayer() + { + return FPlayers.i.get(sender); + } + + public String getFactionId() + { + return Factions.i.getNextId(); + } - public String getFactionTag() - { - return factionTag; - } + public String getFactionTag() + { + return factionTag; + } - public HandlerList getHandlers() - { - return handlers; - } + public HandlerList getHandlers() + { + return handlers; + } - public static HandlerList getHandlerList() - { - return handlers; - } + public static HandlerList getHandlerList() + { + return handlers; + } - @Override - public boolean isCancelled() - { - return cancelled; - } + @Override + public boolean isCancelled() + { + return cancelled; + } - @Override - public void setCancelled(boolean c) - { - this.cancelled = c; - } + @Override + public void setCancelled(boolean c) + { + this.cancelled = c; + } } \ No newline at end of file diff --git a/src/com/massivecraft/factions/event/FactionDisbandEvent.java b/src/com/massivecraft/factions/event/FactionDisbandEvent.java index ccf155da..2d742feb 100644 --- a/src/com/massivecraft/factions/event/FactionDisbandEvent.java +++ b/src/com/massivecraft/factions/event/FactionDisbandEvent.java @@ -12,53 +12,53 @@ import com.massivecraft.factions.Factions; public class FactionDisbandEvent extends Event implements Cancellable { - private static final HandlerList handlers = new HandlerList(); + private static final HandlerList handlers = new HandlerList(); - private boolean cancelled; - private String id; - private Player sender; + private boolean cancelled; + private String id; + private Player sender; - public FactionDisbandEvent(Player sender, String factionId) - { - cancelled = false; - this.sender = sender; - this.id = factionId; - } + public FactionDisbandEvent(Player sender, String factionId) + { + cancelled = false; + this.sender = sender; + this.id = factionId; + } - public HandlerList getHandlers() - { - return handlers; - } + public HandlerList getHandlers() + { + return handlers; + } - public static HandlerList getHandlerList() - { - return handlers; - } + public static HandlerList getHandlerList() + { + return handlers; + } - public Faction getFaction() - { - return Factions.i.get(id); - } + public Faction getFaction() + { + return Factions.i.get(id); + } - public FPlayer getFPlayer() - { - return FPlayers.i.get(sender); - } + public FPlayer getFPlayer() + { + return FPlayers.i.get(sender); + } - public Player getPlayer() - { - return sender; - } + public Player getPlayer() + { + return sender; + } - @Override - public boolean isCancelled() - { - return cancelled; - } + @Override + public boolean isCancelled() + { + return cancelled; + } - @Override - public void setCancelled(boolean c) - { - cancelled = c; - } + @Override + public void setCancelled(boolean c) + { + cancelled = c; + } } diff --git a/src/com/massivecraft/factions/event/FactionRelationEvent.java b/src/com/massivecraft/factions/event/FactionRelationEvent.java index 7279777a..8a4686b6 100644 --- a/src/com/massivecraft/factions/event/FactionRelationEvent.java +++ b/src/com/massivecraft/factions/event/FactionRelationEvent.java @@ -7,50 +7,50 @@ import com.massivecraft.factions.struct.Rel; import com.massivecraft.factions.Faction; -public class FactionRelationEvent extends Event { - private static final HandlerList handlers = new HandlerList(); +public class FactionRelationEvent extends Event +{ + private static final HandlerList handlers = new HandlerList(); - private Faction fsender; - private Faction ftarget; - private Rel foldrel; - private Rel frel; + private Faction fsender; + private Faction ftarget; + private Rel foldrel; + private Rel frel; - public FactionRelationEvent(Faction sender, Faction target, Rel oldrel, Rel rel) - { - fsender = sender; - ftarget = target; - foldrel = oldrel; - frel = rel; - } + public FactionRelationEvent(Faction sender, Faction target, Rel oldrel, Rel rel) + { + fsender = sender; + ftarget = target; + foldrel = oldrel; + frel = rel; + } - public HandlerList getHandlers() - { - return handlers; - } + public HandlerList getHandlers() + { + return handlers; + } - public static HandlerList getHandlerList() - { - return handlers; - } + public static HandlerList getHandlerList() + { + return handlers; + } - public Rel getOldRelation() - { - return foldrel; - } + public Rel getOldRelation() + { + return foldrel; + } - public Rel getRelation() - { - return frel; - } + public Rel getRelation() + { + return frel; + } - public Faction getFaction() - { - return fsender; - } - - public Faction getTargetFaction() - { - return ftarget; - } + public Faction getFaction() + { + return fsender; + } + public Faction getTargetFaction() + { + return ftarget; + } } diff --git a/src/com/massivecraft/factions/event/FactionRenameEvent.java b/src/com/massivecraft/factions/event/FactionRenameEvent.java index 7c111332..4454f8f8 100644 --- a/src/com/massivecraft/factions/event/FactionRenameEvent.java +++ b/src/com/massivecraft/factions/event/FactionRenameEvent.java @@ -8,66 +8,67 @@ import org.bukkit.event.HandlerList; import com.massivecraft.factions.FPlayer; import com.massivecraft.factions.Faction; -public class FactionRenameEvent extends Event implements Cancellable { - private static final HandlerList handlers = new HandlerList(); +public class FactionRenameEvent extends Event implements Cancellable +{ + private static final HandlerList handlers = new HandlerList(); - private boolean cancelled; - private FPlayer fplayer; - private Faction faction; - private String tag; + private boolean cancelled; + private FPlayer fplayer; + private Faction faction; + private String tag; - public FactionRenameEvent(FPlayer sender, String newTag) - { - fplayer = sender; - faction = sender.getFaction(); - tag = newTag; - this.cancelled = false; - } + public FactionRenameEvent(FPlayer sender, String newTag) + { + fplayer = sender; + faction = sender.getFaction(); + tag = newTag; + this.cancelled = false; + } - public Faction getFaction() - { - return(faction); - } + public Faction getFaction() + { + return(faction); + } - public FPlayer getFPlayer() - { - return(fplayer); - } + public FPlayer getFPlayer() + { + return(fplayer); + } - public Player getPlayer() - { - return(fplayer.getPlayer()); - } + public Player getPlayer() + { + return(fplayer.getPlayer()); + } - public String getOldFactionTag() - { - return(faction.getTag()); - } + public String getOldFactionTag() + { + return(faction.getTag()); + } - public String getFactionTag() - { - return(tag); - } + public String getFactionTag() + { + return(tag); + } - public HandlerList getHandlers() - { - return handlers; - } + public HandlerList getHandlers() + { + return handlers; + } - public static HandlerList getHandlerList() - { - return handlers; - } + public static HandlerList getHandlerList() + { + return handlers; + } - @Override - public boolean isCancelled() - { - return cancelled; - } + @Override + public boolean isCancelled() + { + return cancelled; + } - @Override - public void setCancelled(boolean c) - { - this.cancelled = c; - } + @Override + public void setCancelled(boolean c) + { + this.cancelled = c; + } } diff --git a/src/com/massivecraft/factions/event/LandClaimEvent.java b/src/com/massivecraft/factions/event/LandClaimEvent.java index 041e5cad..abc08e1b 100644 --- a/src/com/massivecraft/factions/event/LandClaimEvent.java +++ b/src/com/massivecraft/factions/event/LandClaimEvent.java @@ -37,23 +37,23 @@ public class LandClaimEvent extends Event implements Cancellable } public FLocation getLocation() - { - return this.location; - } + { + return this.location; + } public Faction getFaction() { - return faction; + return faction; } public String getFactionId() { - return faction.getId(); + return faction.getId(); } public String getFactionTag() { - return faction.getTag(); + return faction.getTag(); } public FPlayer getFPlayer() @@ -63,7 +63,7 @@ public class LandClaimEvent extends Event implements Cancellable public Player getPlayer() { - return fplayer.getPlayer(); + return fplayer.getPlayer(); } @Override @@ -77,5 +77,4 @@ public class LandClaimEvent extends Event implements Cancellable { this.cancelled = c; } - } diff --git a/src/com/massivecraft/factions/event/LandUnclaimAllEvent.java b/src/com/massivecraft/factions/event/LandUnclaimAllEvent.java index d6d115d4..d93d510f 100755 --- a/src/com/massivecraft/factions/event/LandUnclaimAllEvent.java +++ b/src/com/massivecraft/factions/event/LandUnclaimAllEvent.java @@ -3,7 +3,6 @@ package com.massivecraft.factions.event; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -//import com.massivecraft.factions.FLocation; import com.massivecraft.factions.Faction; import com.massivecraft.factions.FPlayer; import org.bukkit.entity.Player; @@ -12,11 +11,8 @@ public class LandUnclaimAllEvent extends Event { private static final HandlerList handlers = new HandlerList(); - // Location is commented out because there is no clean way to hook currently. - // faction and fplayer should be enough to filter needed information. - // private FLocation[] location; - private Faction faction; - private FPlayer fplayer; + private Faction faction; + private FPlayer fplayer; public LandUnclaimAllEvent(Faction f, FPlayer p) { @@ -34,35 +30,28 @@ public class LandUnclaimAllEvent extends Event return handlers; } -/* - public FLocation getLocation() - { - return this.location; - } - */ - public Faction getFaction() { return faction; } - public String getFactionId() - { - return faction.getId(); - } + public String getFactionId() + { + return faction.getId(); + } - public String getFactionTag() - { - return faction.getTag(); - } + public String getFactionTag() + { + return faction.getTag(); + } - public FPlayer getFPlayer() - { - return fplayer; - } + public FPlayer getFPlayer() + { + return fplayer; + } - public Player getPlayer() - { - return fplayer.getPlayer(); - } + public Player getPlayer() + { + return fplayer.getPlayer(); + } } diff --git a/src/com/massivecraft/factions/event/LandUnclaimEvent.java b/src/com/massivecraft/factions/event/LandUnclaimEvent.java index fb7bc1fd..53d1b052 100644 --- a/src/com/massivecraft/factions/event/LandUnclaimEvent.java +++ b/src/com/massivecraft/factions/event/LandUnclaimEvent.java @@ -14,9 +14,9 @@ public class LandUnclaimEvent extends Event implements Cancellable private static final HandlerList handlers = new HandlerList(); private boolean cancelled; - private FLocation location; - private Faction faction; - private FPlayer fplayer; + private FLocation location; + private Faction faction; + private FPlayer fplayer; public LandUnclaimEvent(FLocation loc, Faction f, FPlayer p) { @@ -38,7 +38,7 @@ public class LandUnclaimEvent extends Event implements Cancellable public FLocation getLocation() { - return this.location; + return this.location; } public Faction getFaction() @@ -46,25 +46,25 @@ public class LandUnclaimEvent extends Event implements Cancellable return faction; } - public String getFactionId() - { - return faction.getId(); - } + public String getFactionId() + { + return faction.getId(); + } - public String getFactionTag() - { - return faction.getTag(); - } + public String getFactionTag() + { + return faction.getTag(); + } - public FPlayer getFPlayer() - { - return fplayer; - } + public FPlayer getFPlayer() + { + return fplayer; + } - public Player getPlayer() - { - return fplayer.getPlayer(); - } + public Player getPlayer() + { + return fplayer.getPlayer(); + } @Override public boolean isCancelled() diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index f02a744e..bb4cd5e5 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -92,8 +92,8 @@ public class FactionsEntityListener implements Listener EntityDamageByEntityEvent sub = (EntityDamageByEntityEvent)event; if ( ! this.canDamagerHurtDamagee(sub, true)) { - event.setCancelled(true); - } + event.setCancelled(true); + } } // TODO: Add a no damage at all flag?? /*else if (Conf.safeZonePreventAllDamageToPlayers && isPlayerInSafeZone(event.getEntity())) diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 85958dc0..acc64ae3 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -61,8 +61,8 @@ public class FactionsPlayerListener implements Listener } @EventHandler(priority = EventPriority.NORMAL) - public void onPlayerQuit(PlayerQuitEvent event) - { + public void onPlayerQuit(PlayerQuitEvent event) + { FPlayer me = FPlayers.i.get(event.getPlayer()); // Make sure player's power is up to date when they log off. @@ -114,8 +114,8 @@ public class FactionsPlayerListener implements Listener } @EventHandler(priority = EventPriority.NORMAL) - public void onPlayerInteract(PlayerInteractEvent event) - { + public void onPlayerInteract(PlayerInteractEvent event) + { if (event.isCancelled()) return; Block block = event.getClickedBlock(); @@ -163,9 +163,9 @@ public class FactionsPlayerListener implements Listener } } - // TODO: Refactor ! justCheck -> to informIfNot - // TODO: Possibly incorporate pain build... - public static boolean playerCanUseItemHere(Player player, Location loc, Material material, boolean justCheck) + // TODO: Refactor ! justCheck -> to informIfNot + // TODO: Possibly incorporate pain build... + public static boolean playerCanUseItemHere(Player player, Location loc, Material material, boolean justCheck) { String name = player.getName(); if (Conf.playersWhoBypassAllProtection.contains(name)) return true; diff --git a/src/com/massivecraft/factions/struct/ChatMode.java b/src/com/massivecraft/factions/struct/ChatMode.java index 6e9e6e05..436a1cd2 100644 --- a/src/com/massivecraft/factions/struct/ChatMode.java +++ b/src/com/massivecraft/factions/struct/ChatMode.java @@ -11,9 +11,9 @@ public enum ChatMode private ChatMode(final int value, final String nicename) { - this.value = value; - this.nicename = nicename; - } + this.value = value; + this.nicename = nicename; + } public boolean isAtLeast(ChatMode role) { diff --git a/src/com/massivecraft/factions/struct/Permission.java b/src/com/massivecraft/factions/struct/Permission.java index d106ff65..1a3f0ccd 100644 --- a/src/com/massivecraft/factions/struct/Permission.java +++ b/src/com/massivecraft/factions/struct/Permission.java @@ -62,7 +62,7 @@ public enum Permission Permission(final String node) { this.node = "factions."+node; - } + } public boolean has(CommandSender sender, boolean informSenderIfNot) { diff --git a/src/com/massivecraft/factions/util/AsciiCompass.java b/src/com/massivecraft/factions/util/AsciiCompass.java index c3adedf3..9d07cb8d 100644 --- a/src/com/massivecraft/factions/util/AsciiCompass.java +++ b/src/com/massivecraft/factions/util/AsciiCompass.java @@ -21,8 +21,8 @@ public class AsciiCompass private Point(final char asciiChar) { - this.asciiChar = asciiChar; - } + this.asciiChar = asciiChar; + } @Override public String toString() @@ -62,7 +62,7 @@ public class AsciiCompass return AsciiCompass.Point.N; else return null; - } + } public static ArrayList getAsciiCompass(Point point, ChatColor colorActive, String colorDefault) { diff --git a/src/com/massivecraft/factions/zcore/util/DiscUtil.java b/src/com/massivecraft/factions/zcore/util/DiscUtil.java index 36230408..43e4c244 100644 --- a/src/com/massivecraft/factions/zcore/util/DiscUtil.java +++ b/src/com/massivecraft/factions/zcore/util/DiscUtil.java @@ -61,8 +61,8 @@ public class DiscUtil URL url = new URL(urlstring); ReadableByteChannel rbc = Channels.newChannel(url.openStream()); FileOutputStream fos = new FileOutputStream(file); - fos.getChannel().transferFrom(rbc, 0, 1 << 24); - return true; + fos.getChannel().transferFrom(rbc, 0, 1 << 24); + return true; } catch (Exception e) { diff --git a/src/com/massivecraft/factions/zcore/util/TextUtil.java b/src/com/massivecraft/factions/zcore/util/TextUtil.java index 39a6a305..18ace345 100644 --- a/src/com/massivecraft/factions/zcore/util/TextUtil.java +++ b/src/com/massivecraft/factions/zcore/util/TextUtil.java @@ -76,14 +76,14 @@ public class TextUtil public static String parseColorAmp(String string) { string = string.replaceAll("(ยง([a-z0-9]))", "\u00A7$2"); - string = string.replaceAll("(&([a-z0-9]))", "\u00A7$2"); - string = string.replace("&&", "&"); - return string; + string = string.replaceAll("(&([a-z0-9]))", "\u00A7$2"); + string = string.replace("&&", "&"); + return string; } - public static String parseColorAcc(String string) - { - return string.replace("`e", "") + public static String parseColorAcc(String string) + { + return string.replace("`e", "") .replace("`r", ChatColor.RED.toString()) .replace("`R", ChatColor.DARK_RED.toString()) .replace("`y", ChatColor.YELLOW.toString()) .replace("`Y", ChatColor.GOLD.toString()) .replace("`g", ChatColor.GREEN.toString()) .replace("`G", ChatColor.DARK_GREEN.toString()) @@ -92,27 +92,27 @@ public class TextUtil .replace("`p", ChatColor.LIGHT_PURPLE.toString()) .replace("`P", ChatColor.DARK_PURPLE.toString()) .replace("`k", ChatColor.BLACK.toString()) .replace("`s", ChatColor.GRAY.toString()) .replace("`S", ChatColor.DARK_GRAY.toString()) .replace("`w", ChatColor.WHITE.toString()); - } + } public static String parseColorTags(String string) { - return string.replace("", "") - .replace("", "\u00A70") - .replace("", "\u00A71") - .replace("", "\u00A72") - .replace("", "\u00A73") - .replace("", "\u00A74") - .replace("", "\u00A75") - .replace("", "\u00A76") - .replace("", "\u00A77") - .replace("", "\u00A78") - .replace("", "\u00A79") - .replace("", "\u00A7a") - .replace("", "\u00A7b") - .replace("", "\u00A7c") - .replace("", "\u00A7d") - .replace("", "\u00A7e") - .replace("", "\u00A7f"); + return string.replace("", "") + .replace("", "\u00A70") + .replace("", "\u00A71") + .replace("", "\u00A72") + .replace("", "\u00A73") + .replace("", "\u00A74") + .replace("", "\u00A75") + .replace("", "\u00A76") + .replace("", "\u00A77") + .replace("", "\u00A78") + .replace("", "\u00A79") + .replace("", "\u00A7a") + .replace("", "\u00A7b") + .replace("", "\u00A7c") + .replace("", "\u00A7d") + .replace("", "\u00A7e") + .replace("", "\u00A7f"); } // -------------------------------------------- // @@ -126,27 +126,27 @@ public class TextUtil public static String repeat(String s, int times) { - if (times <= 0) return ""; - else return s + repeat(s, times-1); + if (times <= 0) return ""; + else return s + repeat(s, times-1); } public static String implode(List list, String glue) { - StringBuilder ret = new StringBuilder(); - for (int i=0; i list, String comma, String and) { - if (list.size() == 0) return ""; + if (list.size() == 0) return ""; if (list.size() == 1) return list.get(0); String lastItem = list.get(list.size()-1); @@ -159,7 +159,7 @@ public class TextUtil } public static String implodeCommaAnd(List list) { - return implodeCommaAnd(list, ", ", " and "); + return implodeCommaAnd(list, ", ", " and "); } // -------------------------------------------- //