Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 84f1d35

Browse files
committed
Fixed spacing in code around ! operator.
1 parent 7f1785e commit 84f1d35

File tree

119 files changed

+619
-619
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+619
-619
lines changed

src/main/java/com/massivecraft/factions/Conf.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ public class Conf {
377377
territoryDenyUseageMaterials.add(MultiversionMaterials.JUNGLE_BUTTON.parseMaterial());
378378
territoryDenyUseageMaterials.add(MultiversionMaterials.OAK_BUTTON.parseMaterial());
379379
territoryDenyUseageMaterials.add(MultiversionMaterials.STONE_BUTTON.parseMaterial());
380-
if (! SavageFactions.plugin.mc17) {
380+
if (!SavageFactions.plugin.mc17) {
381381
territoryDenyUseageMaterials.add(Material.ARMOR_STAND);
382382
}
383383

@@ -413,7 +413,7 @@ public class Conf {
413413
territoryDenyUseageMaterialsWhenOffline.add(MultiversionMaterials.JUNGLE_BUTTON.parseMaterial());
414414
territoryDenyUseageMaterialsWhenOffline.add(MultiversionMaterials.OAK_BUTTON.parseMaterial());
415415
territoryDenyUseageMaterialsWhenOffline.add(MultiversionMaterials.STONE_BUTTON.parseMaterial());
416-
if (! SavageFactions.plugin.mc17) {
416+
if (!SavageFactions.plugin.mc17) {
417417
territoryDenyUseageMaterialsWhenOffline.add(Material.ARMOR_STAND);
418418
}
419419
safeZoneNerfedCreatureTypes.add(EntityType.BLAZE);

src/main/java/com/massivecraft/factions/FLocation.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public boolean isInChunk(Location loc) {
191191
* @return whether this location is outside of the border
192192
*/
193193
public boolean isOutsideWorldBorder(int buffer) {
194-
if (! worldBorderSupport) {
194+
if (!worldBorderSupport) {
195195
return false;
196196
}
197197

@@ -247,7 +247,7 @@ public boolean equals(Object obj) {
247247
if (obj == this) {
248248
return true;
249249
}
250-
if (! (obj instanceof FLocation)) {
250+
if (!(obj instanceof FLocation)) {
251251
return false;
252252
}
253253

src/main/java/com/massivecraft/factions/MassiveStats.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void onPlayerJoin(PlayerJoinEvent event) {
224224
}
225225

226226
// and only notify operators - or players with the correct permission.
227-
if (! event.getPlayer().isOp() && ! event.getPlayer().hasPermission(MassiveStats.MASSIVE_UPDATE_PERMISSION)) {
227+
if (!event.getPlayer().isOp() && !event.getPlayer().hasPermission(MassiveStats.MASSIVE_UPDATE_PERMISSION)) {
228228
return;
229229
}
230230

@@ -456,7 +456,7 @@ final class MassiveStatsDataResponse {
456456
MassiveStatsDataResponse(boolean isUpToDate, String newVersion, String updateMessage) {
457457
this.isUpToDate = isUpToDate;
458458

459-
if (! isUpToDate) {
459+
if (!isUpToDate) {
460460
this.newVersion = newVersion;
461461
this.updateMessage = updateMessage;
462462
return;

src/main/java/com/massivecraft/factions/SavageFactions.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void run() {
145145
setupMultiversionMaterials();
146146
log("==== End Setup ====");
147147

148-
if (! preEnable()) {
148+
if (!preEnable()) {
149149
return;
150150
}
151151
this.loadSuccessful = false;
@@ -256,7 +256,7 @@ private void setupMultiversionMaterials() {
256256
FIREBALL = Material.valueOf("LEGACY_FIREBALL");
257257

258258
} else {
259-
if (! mc17) {
259+
if (!mc17) {
260260
BANNER = Material.valueOf("BANNER");
261261
}
262262
CROPS = Material.valueOf("CROPS");
@@ -420,7 +420,7 @@ public void onDisable() {
420420

421421
public void startAutoLeaveTask(boolean restartIfRunning) {
422422
if (AutoLeaveTask != null) {
423-
if (! restartIfRunning) {
423+
if (!restartIfRunning) {
424424
return;
425425
}
426426
this.getServer().getScheduler().cancelTask(AutoLeaveTask);
@@ -540,7 +540,7 @@ public boolean isPlayerFactionChatting(Player player) {
540540
// TODO: GET THIS BACK AND WORKING
541541

542542
public boolean isFactionsCommand(String check) {
543-
return ! (check == null || check.isEmpty()) && this.handleCommand(null, check, true);
543+
return !(check == null || check.isEmpty()) && this.handleCommand(null, check, true);
544544
}
545545

546546
// Get a player's faction tag (faction name), mainly for usage by chat plugins for local/channel chat
@@ -562,7 +562,7 @@ public String getPlayerFactionTagRelation(Player speaker, Player listener) {
562562
}
563563

564564
// if listener isn't set, or config option is disabled, give back uncolored tag
565-
if (listener == null || ! Conf.chatTagRelationColored) {
565+
if (listener == null || !Conf.chatTagRelationColored) {
566566
tag = me.getChatTag().trim();
567567
} else {
568568
FPlayer you = FPlayers.getInstance().getByPlayer(listener);
@@ -641,7 +641,7 @@ public boolean isHookedPlayervaults() {
641641
}
642642

643643
public String getPrimaryGroup(OfflinePlayer player) {
644-
return perms == null || ! perms.hasGroupSupport() ? " " : perms.getPrimaryGroup(Bukkit.getWorlds().get(0).toString(), player);
644+
return perms == null || !perms.hasGroupSupport() ? " " : perms.getPrimaryGroup(Bukkit.getWorlds().get(0).toString(), player);
645645
}
646646

647647
public void debug(Level level, String s) {

src/main/java/com/massivecraft/factions/cmd/CmdAdmin.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ public void perform() {
4040
boolean permAny = Permission.ADMIN_ANY.has(sender, false);
4141
Faction targetFaction = fyou.getFaction();
4242

43-
if (targetFaction != myFaction && ! permAny) {
43+
if (targetFaction != myFaction && !permAny) {
4444
msg(TL.COMMAND_ADMIN_NOTMEMBER, fyou.describeTo(fme, true));
4545
return;
4646
}
4747

48-
if (fme != null && fme.getRole() != Role.LEADER && ! permAny) {
48+
if (fme != null && fme.getRole() != Role.LEADER && !permAny) {
4949
msg(TL.COMMAND_ADMIN_NOTADMIN);
5050
return;
5151
}
5252

53-
if (fyou == fme && ! permAny) {
53+
if (fyou == fme && !permAny) {
5454
msg(TL.COMMAND_ADMIN_TARGETSELF);
5555
return;
5656
}

src/main/java/com/massivecraft/factions/cmd/CmdAutoClaim.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void perform() {
3232
return;
3333
}
3434

35-
if (! fme.canClaimForFaction(forFaction)) {
35+
if (!fme.canClaimForFaction(forFaction)) {
3636
if (myFaction == forFaction) {
3737
msg(TL.COMMAND_AUTOCLAIM_REQUIREDRANK, Role.MODERATOR.getTranslation());
3838
} else {

src/main/java/com/massivecraft/factions/cmd/CmdBan.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public CmdBan() {
3535
public void perform() {
3636

3737
// Adds bypass to admins and clean permission check
38-
if (! fme.isAdminBypassing()) {
38+
if (!fme.isAdminBypassing()) {
3939
Access access = myFaction.getAccess(fme, PermissableAction.BAN);
4040
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
4141
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "ban");

src/main/java/com/massivecraft/factions/cmd/CmdBanlist.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public CmdBanlist() {
3333
@Override
3434
public void perform() {
3535
Faction target = myFaction;
36-
if (! args.isEmpty()) {
36+
if (!args.isEmpty()) {
3737
target = argAsFaction(0);
3838
}
3939

src/main/java/com/massivecraft/factions/cmd/CmdBanner.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public CmdBanner() {
3131

3232
@Override
3333
public void perform() {
34-
if (! SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
34+
if (!SavageFactions.plugin.getConfig().getBoolean("fbanners.Enabled")) {
3535
msg(TL.COMMAND_BANNER_DISABLED);
3636
return;
3737
}
38-
if (! fme.hasMoney(SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
38+
if (!fme.hasMoney(SavageFactions.plugin.getConfig().getInt("fbanners.Banner-Cost", 5000))) {
3939
msg(TL.COMMAND_BANNER_NOTENOUGHMONEY);
4040
return;
4141
}

src/main/java/com/massivecraft/factions/cmd/CmdBoom.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ public CmdBoom() {
2727

2828
@Override
2929
public void perform() {
30-
if (! myFaction.isPeaceful()) {
30+
if (!myFaction.isPeaceful()) {
3131
fme.msg(TL.COMMAND_BOOM_PEACEFULONLY);
3232
return;
3333
}
3434

3535
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
36-
if (! payForCommand(Conf.econCostNoBoom, TL.COMMAND_BOOM_TOTOGGLE, TL.COMMAND_BOOM_FORTOGGLE)) {
36+
if (!payForCommand(Conf.econCostNoBoom, TL.COMMAND_BOOM_TOTOGGLE, TL.COMMAND_BOOM_FORTOGGLE)) {
3737
return;
3838
}
3939

40-
myFaction.setPeacefulExplosionsEnabled(this.argAsBool(0, ! myFaction.getPeacefulExplosionsEnabled()));
40+
myFaction.setPeacefulExplosionsEnabled(this.argAsBool(0, !myFaction.getPeacefulExplosionsEnabled()));
4141

4242
String enabled = myFaction.noExplosionsInTerritory() ? TL.GENERIC_DISABLED.toString() : TL.GENERIC_ENABLED.toString();
4343

src/main/java/com/massivecraft/factions/cmd/CmdBypass.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public CmdBypass() {
2525

2626
@Override
2727
public void perform() {
28-
fme.setIsAdminBypassing(this.argAsBool(0, ! fme.isAdminBypassing()));
28+
fme.setIsAdminBypassing(this.argAsBool(0, !fme.isAdminBypassing()));
2929

3030
// TODO: Move this to a transient field in the model??
3131
if (fme.isAdminBypassing()) {

src/main/java/com/massivecraft/factions/cmd/CmdChat.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public CmdChat() {
2828

2929
@Override
3030
public void perform() {
31-
if (! Conf.factionOnlyChat) {
31+
if (!Conf.factionOnlyChat) {
3232
msg(TL.COMMAND_CHAT_DISABLED.toString());
3333
return;
3434
}
@@ -41,7 +41,7 @@ public void perform() {
4141
// Only allow Mods and higher rank to switch to this channel.
4242
if (modeString.startsWith("m") && fme.getRole().isAtLeast(Role.MODERATOR)) {
4343
modeTarget = ChatMode.MOD;
44-
} else if (modeString.startsWith("m") && ! fme.getRole().isAtLeast(Role.MODERATOR)) {
44+
} else if (modeString.startsWith("m") && !fme.getRole().isAtLeast(Role.MODERATOR)) {
4545
msg(TL.COMMAND_CHAT_MOD_ONLY);
4646
return;
4747
} else if (modeString.startsWith("p")) {

src/main/java/com/massivecraft/factions/cmd/CmdChatSpy.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public CmdChatSpy() {
2424

2525
@Override
2626
public void perform() {
27-
fme.setSpyingChat(this.argAsBool(0, ! fme.isSpyingChat()));
27+
fme.setSpyingChat(this.argAsBool(0, !fme.isSpyingChat()));
2828

2929
if (fme.isSpyingChat()) {
3030
fme.msg(TL.COMMAND_CHATSPY_ENABLE);

src/main/java/com/massivecraft/factions/cmd/CmdCheckpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public CmdCheckpoint() {
2626

2727
@Override
2828
public void perform() {
29-
if (! SavageFactions.plugin.getConfig().getBoolean("checkpoints.Enabled")) {
29+
if (!SavageFactions.plugin.getConfig().getBoolean("checkpoints.Enabled")) {
3030
fme.msg(TL.COMMAND_CHECKPOINT_DISABLED);
3131
return;
3232
}

src/main/java/com/massivecraft/factions/cmd/CmdChest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ public CmdChest() {
2828
public void perform() {
2929

3030

31-
if (! SavageFactions.plugin.getConfig().getBoolean("fchest.Enabled")) {
31+
if (!SavageFactions.plugin.getConfig().getBoolean("fchest.Enabled")) {
3232
fme.sendMessage("This command is disabled!");
3333
return;
3434
}
3535
// This permission check is way too explicit but it's clean
36-
if (! fme.isAdminBypassing()) {
36+
if (!fme.isAdminBypassing()) {
3737
Access access = myFaction.getAccess(fme, PermissableAction.CHEST);
3838
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
3939
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "access chest");

src/main/java/com/massivecraft/factions/cmd/CmdClaim.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void perform() {
3737
int radius = this.argAsInt(0, 1); // Default to 1
3838
final Faction forFaction = this.argAsFaction(1, myFaction); // Default to own
3939

40-
if (! fme.isAdminBypassing()) {
40+
if (!fme.isAdminBypassing()) {
4141
Access access = myFaction.getAccess(fme, PermissableAction.TERRITORY);
4242
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
4343
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "change faction territory");
@@ -56,7 +56,7 @@ public void perform() {
5656
fme.attemptClaim(forFaction, me.getLocation(), true);
5757
} else {
5858
// radius claim
59-
if (! Permission.CLAIM_RADIUS.has(sender, false)) {
59+
if (!Permission.CLAIM_RADIUS.has(sender, false)) {
6060
msg(TL.COMMAND_CLAIM_DENIED);
6161
return;
6262
}

src/main/java/com/massivecraft/factions/cmd/CmdColeader.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ public void perform() {
5050
boolean permAny = Permission.COLEADER_ANY.has(sender, false);
5151
Faction targetFaction = you.getFaction();
5252

53-
if (targetFaction != myFaction && ! permAny) {
53+
if (targetFaction != myFaction && !permAny) {
5454
msg(TL.COMMAND_MOD_NOTMEMBER, you.describeTo(fme, true));
5555
return;
5656
}
5757

58-
if (fme != null && fme.getRole() != Role.LEADER && ! permAny) {
58+
if (fme != null && fme.getRole() != Role.LEADER && !permAny) {
5959
msg(TL.COMMAND_COLEADER_NOTADMIN);
6060
return;
6161
}
6262

63-
if (you == fme && ! permAny) {
63+
if (you == fme && !permAny) {
6464
msg(TL.COMMAND_COLEADER_SELF);
6565
return;
6666
}

src/main/java/com/massivecraft/factions/cmd/CmdConfig.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ else if (innerType == String.class) {
228228
return;
229229
}
230230

231-
if (! success.isEmpty()) {
231+
if (!success.isEmpty()) {
232232
if (sender instanceof Player) {
233233
sendMessage(success);
234234
SavageFactions.plugin.log(success + TL.COMMAND_CONFIG_LOG.format((Player) sender));

src/main/java/com/massivecraft/factions/cmd/CmdConvert.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public CmdConvert() {
1616

1717
@Override
1818
public void perform() {
19-
if (! (this.sender instanceof ConsoleCommandSender)) {
19+
if (!(this.sender instanceof ConsoleCommandSender)) {
2020
this.sender.sendMessage(TL.GENERIC_CONSOLEONLY.toString());
2121
}
2222
Backend nb = Backend.valueOf(this.argAsString(0).toUpperCase());

src/main/java/com/massivecraft/factions/cmd/CmdCreate.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public void perform() {
5252
}
5353

5454
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make sure they can pay
55-
if (! canAffordCommand(Conf.econCostCreate, TL.COMMAND_CREATE_TOCREATE.toString())) {
55+
if (!canAffordCommand(Conf.econCostCreate, TL.COMMAND_CREATE_TOCREATE.toString())) {
5656
return;
5757
}
5858

@@ -64,7 +64,7 @@ public void perform() {
6464
}
6565

6666
// then make 'em pay (if applicable)
67-
if (! payForCommand(Conf.econCostCreate, TL.COMMAND_CREATE_TOCREATE, TL.COMMAND_CREATE_FORCREATE)) {
67+
if (!payForCommand(Conf.econCostCreate, TL.COMMAND_CREATE_TOCREATE, TL.COMMAND_CREATE_FORCREATE)) {
6868
return;
6969
}
7070

src/main/java/com/massivecraft/factions/cmd/CmdDeinvite.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public CmdDeinvite() {
3434
@Override
3535
public void perform() {
3636
FPlayer you = this.argAsBestFPlayerMatch(0);
37-
if (! fme.isAdminBypassing()) {
37+
if (!fme.isAdminBypassing()) {
3838
Access access = myFaction.getAccess(fme, PermissableAction.INVITE);
3939
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
4040
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "manage invites");

src/main/java/com/massivecraft/factions/cmd/CmdDelFWarp.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public CmdDelFWarp() {
2323
public void perform() {
2424
String warp = argAsString(0);
2525
if (myFaction.isWarp(warp)) {
26-
if (! transact(fme)) {
26+
if (!transact(fme)) {
2727
return;
2828
}
2929
myFaction.removeWarp(warp);
@@ -34,7 +34,7 @@ public void perform() {
3434
}
3535

3636
private boolean transact(FPlayer player) {
37-
return ! SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(SavageFactions.plugin.getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
37+
return !SavageFactions.plugin.getConfig().getBoolean("warp-cost.enabled", false) || player.isAdminBypassing() || payForCommand(SavageFactions.plugin.getConfig().getDouble("warp-cost.delwarp", 5), TL.COMMAND_DELFWARP_TODELETE.toString(), TL.COMMAND_DELFWARP_FORDELETE.toString());
3838
}
3939

4040
@Override

src/main/java/com/massivecraft/factions/cmd/CmdDescription.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ public CmdDescription() {
3131
@Override
3232
public void perform() {
3333
// if economy is enabled, they're not on the bypass list, and this command has a cost set, make 'em pay
34-
if (! payForCommand(Conf.econCostDesc, TL.COMMAND_DESCRIPTION_TOCHANGE, TL.COMMAND_DESCRIPTION_FORCHANGE)) {
34+
if (!payForCommand(Conf.econCostDesc, TL.COMMAND_DESCRIPTION_TOCHANGE, TL.COMMAND_DESCRIPTION_FORCHANGE)) {
3535
return;
3636
}
3737

3838
// since "&" color tags seem to work even through plain old FPlayer.sendMessage() for some reason, we need to break those up
3939
// And replace all the % because it messes with string formatting and this is easy way around that.
4040
myFaction.setDescription(TextUtil.implode(args, " ").replaceAll("%", "").replaceAll("(&([a-f0-9klmnor]))", "& $2"));
4141

42-
if (! Conf.broadcastDescriptionChanges) {
42+
if (!Conf.broadcastDescriptionChanges) {
4343
fme.msg(TL.COMMAND_DESCRIPTION_CHANGED, myFaction.describeTo(fme));
4444
fme.sendMessage(myFaction.getDescription());
4545
return;

src/main/java/com/massivecraft/factions/cmd/CmdDisband.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public void perform() {
4646
boolean isMyFaction = fme != null && faction == myFaction;
4747

4848

49-
if (! fme.isAdminBypassing()) {
49+
if (!fme.isAdminBypassing()) {
5050
Access access = faction.getAccess(fme, PermissableAction.DISBAND);
5151
if (fme.getRole() != Role.LEADER && access != Access.ALLOW) {
5252
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "disband " + faction.getTag());
@@ -66,7 +66,7 @@ public void perform() {
6666

6767
// check for tnt before disbanding.
6868

69-
if (! disbandMap.containsKey(me.getUniqueId().toString()) && faction.getTnt() > 0) {
69+
if (!disbandMap.containsKey(me.getUniqueId().toString()) && faction.getTnt() > 0) {
7070
msg(TL.COMMAND_DISBAND_CONFIRM.toString().replace("{tnt}", faction.getTnt() + ""));
7171
disbandMap.put(me.getUniqueId().toString(), faction.getId());
7272
Bukkit.getScheduler().scheduleSyncDelayedTask(SavageFactions.plugin, new Runnable() {

0 commit comments

Comments
 (0)