Skip to content

Commit ed31471

Browse files
committed
Many fixes from Humbug and elsewhere, other cleanup
2 parents 2ec3b0e + 20db0ac commit ed31471

File tree

11 files changed

+354
-70
lines changed

11 files changed

+354
-70
lines changed

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Editorconfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
indent_style = tab
10+
indent_size = 4
11+
end_of_line = lf
12+
insert_final_newline = true
13+
continuation_indent_size = 8
14+
15+
[*.java]
16+
indent_style = tab
17+
indent_size = 4
18+
19+
[*.xml]
20+
indent_style = tab
21+
indent_size = 2
22+
23+
[*.yml]
24+
indent_style = space
25+
indent_size = 2

pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<groupId>com.programmerdan.minecraft</groupId>
77
<artifactId>SimpleAdminHacks</artifactId>
88
<packaging>jar</packaging>
9-
<version>1.1.2</version>
9+
<version>1.2.1</version>
1010
<name>SimpleAdminHacks</name>
1111
<url>https://github.com/DevotedMC/SimpleAdminHacks</url>
1212

@@ -107,13 +107,13 @@
107107
<dependency>
108108
<groupId>org.spigotmc</groupId>
109109
<artifactId>spigot</artifactId>
110-
<version>1.10.2-R0.1-SNAPSHOT</version>
110+
<version>1.12-R0.1-SNAPSHOT</version>
111111
<scope>provided</scope>
112112
</dependency>
113113
<dependency>
114114
<groupId>net.minelink</groupId>
115115
<artifactId>CombatTagPlus</artifactId>
116-
<version>1.2.4-SNAPSHOT</version>
116+
<version>1.3.1-SNAPSHOT</version>
117117
<scope>provided</scope>
118118
<exclusions>
119119
<exclusion>
@@ -142,24 +142,24 @@
142142
<dependency>
143143
<groupId>com.comphenix.protocol</groupId>
144144
<artifactId>ProtocolLib-API</artifactId>
145-
<version>4.0-SNAPSHOT</version>
145+
<version>4.3.0-SNAPSHOT</version>
146146
</dependency>
147147
<dependency>
148148
<groupId>vg.civcraft.mc.namelayer</groupId>
149149
<artifactId>NameLayer</artifactId>
150-
<version>2.9.08</version>
150+
<version>2.11.0</version>
151151
<scope>provided</scope>
152152
</dependency>
153153
<dependency>
154154
<groupId>vg.civcraft.mc.citadel</groupId>
155155
<artifactId>Citadel</artifactId>
156-
<version>3.7.02</version>
156+
<version>3.9.0</version>
157157
<scope>provided</scope>
158158
</dependency>
159159
<dependency>
160160
<groupId>vg.civcraft.mc.civmodcore</groupId>
161161
<artifactId>CivModCore</artifactId>
162-
<version>1.5.09</version>
162+
<version>1.6.0</version>
163163
<scope>provided</scope>
164164
</dependency>
165165
<!-- Note: CrazyCrates isn't distributed in POM form.

src/main/java/com/programmerdan/minecraft/simpleadminhacks/configs/GameFeaturesConfig.java

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,18 @@ public class GameFeaturesConfig extends SimpleHackConfig {
2828
private boolean villagerTrading;
2929
private boolean witherSpawning;
3030
private boolean enderChestPlacement;
31+
private boolean enderChestUse;
32+
private boolean shulkerBoxUse;
33+
private boolean totemPowers;
34+
private boolean elytraUse;
35+
private boolean chorusFruitUse;
3136

3237
private boolean weepingAngel;
3338
private int weepingAngelEnv;
3439
private int weepingAngelPlayer;
3540

41+
private boolean blockWaterInHell;
42+
3643
public GameFeaturesConfig(SimpleAdminHacks plugin, ConfigurationSection base) {
3744
super(plugin, base);
3845
}
@@ -43,22 +50,39 @@ protected void wireup(ConfigurationSection config) {
4350
if (!this.potatoXPEnabled) plugin().log(" Potato XP Disabled");
4451

4552
this.villagerTrading = config.getBoolean("villagerTrading", false);
46-
if (!villagerTrading) plugin().log("VillagerTrading is disabled");
53+
if (!villagerTrading) plugin().log(" VillagerTrading is disabled");
4754

4855
this.witherSpawning = config.getBoolean("witherSpawning", false);
49-
if (!this.witherSpawning) plugin().log("Wither Spawning is disabled");
50-
51-
this.enderChestPlacement = config.getBoolean("enderChestPlacement", false);
52-
if (!this.enderChestPlacement) plugin().log("Placeing EnderChests is disabled");
53-
54-
this.weepingAngel = config.getBoolean("weepingAngel.enabled", false);
56+
if (!this.witherSpawning) plugin().log(" Wither Spawning is disabled");
57+
58+
this.enderChestPlacement = config.getBoolean("enderChestPlacement", true);
59+
if (!this.enderChestPlacement) plugin().log(" Placing EnderChests is disabled");
60+
61+
this.enderChestUse = config.getBoolean("enderChestUse", false);
62+
if (!this.enderChestUse) plugin().log(" Using EnderChests is disabled");
63+
64+
this.shulkerBoxUse = config.getBoolean("shulkerBoxUse", false);
65+
if (!this.shulkerBoxUse) plugin().log(" Using Shulker Boxes is disabled");
66+
67+
this.totemPowers = config.getBoolean("totemPower", false);
68+
if (!this.totemPowers) plugin().log(" Undeath via totems is disabled");
69+
70+
this.elytraUse = config.getBoolean("elytraUse", true);
71+
if (!this.elytraUse) plugin().log(" Elytra use is disabled");
72+
73+
this.chorusFruitUse = config.getBoolean("chorusFruitTeleportation", false);
74+
if (!this.chorusFruitUse) plugin().log(" Chorus Fruit Teleportation is disabled");
75+
76+
this.weepingAngel = config.getBoolean("weepingAngel.enabled", false);
5577
if (this.weepingAngel) {
5678
this.weepingAngelEnv = config.getInt("weepingAngel.environment", 1);
5779
this.weepingAngelPlayer = config.getInt("weepingAngel.playerKill", 5);
5880

59-
plugin().log("Weeping Angel is enabled. Times | Env[" + weepingAngelEnv + "] PK[" + weepingAngelPlayer + "]");
81+
plugin().log(" Weeping Angel is enabled. Times | Env[" + weepingAngelEnv + "] PK[" + weepingAngelPlayer + "]");
6082
}
6183

84+
this.blockWaterInHell = config.getBoolean("blockWaterInHell", true);
85+
if (this.blockWaterInHell) plugin().log(" Blocking bucket use in hell biomes");
6286

6387
/* Add additional feature config grabs here. */
6488
}
@@ -82,6 +106,26 @@ public boolean isEnderChestPlacement() {
82106
return this.enderChestPlacement;
83107
}
84108

109+
public boolean isEnderChestUse() {
110+
return this.enderChestUse;
111+
}
112+
113+
public boolean isShulkerBoxUse() {
114+
return this.shulkerBoxUse;
115+
}
116+
117+
public boolean isTotemPowers() {
118+
return this.totemPowers;
119+
}
120+
121+
public boolean isElytraUse() {
122+
return this.elytraUse;
123+
}
124+
125+
public boolean isChorusFruitTeleportation() {
126+
return this.chorusFruitUse;
127+
}
128+
85129
public boolean isWeepingAngel() {
86130
return this.weepingAngel;
87131
}
@@ -94,5 +138,9 @@ public int getWeepingAngelPlayer() {
94138
return this.weepingAngelPlayer;
95139
}
96140

141+
public boolean isBlockWaterInHell() {
142+
return this.blockWaterInHell;
143+
}
144+
97145
}
98146

src/main/java/com/programmerdan/minecraft/simpleadminhacks/configs/GameFixesConfig.java

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.programmerdan.minecraft.simpleadminhacks.SimpleHackConfig;
99

1010
import java.util.ArrayList;
11+
import java.util.logging.Level;
1112

1213
public class GameFixesConfig extends SimpleHackConfig {
1314

@@ -17,7 +18,8 @@ public class GameFixesConfig extends SimpleHackConfig {
1718
private boolean stopHopperDupe;
1819
private boolean stopRailDupe;
1920
private boolean stopEndPortalDeletion;
20-
21+
private boolean stopBedBombing;
22+
2123
private ArrayList<BlockFace> bfArray;
2224
private ArrayList<Material> railArray;
2325
private ArrayList<Material> pistonArray;
@@ -30,14 +32,22 @@ public GameFixesConfig(SimpleAdminHacks plugin, ConfigurationSection base) {
3032
protected void wireup(ConfigurationSection config) {
3133
blockElytraBreakBug = config.getBoolean("blockElytraBreakBug", true);
3234
damageOnElytraBreakBug = config.getDouble("damageOnElytraBreakBug", 0.0d);
35+
if (blockElytraBreakBug) plugin().log(Level.INFO, " Block Elytra 1height break bug is enabled, doing {} damage to violators", damageOnElytraBreakBug);
36+
3337
canStorageTeleport = config.getBoolean("canStorageTeleport");
38+
if (!canStorageTeleport) plugin().log(" Storage holder teleportation is disabled.");
39+
3440
stopHopperDupe = config.getBoolean("stopHopperDupe");
41+
if (stopHopperDupe) plugin().log(" Stop Hopper self-feeding Dupe is enabled.");
3542

3643
stopRailDupe = config.getBoolean("stopRailDupe", true);
37-
if (stopRailDupe) plugin().log("Stop Rail Dupe is enabled.");
44+
if (stopRailDupe) plugin().log(" Stop Rail Dupe is enabled.");
3845

3946
stopEndPortalDeletion = config.getBoolean("stopEndPortalDeletion", true);
40-
if (stopEndPortalDeletion) plugin().log("Stop End Portal Deletion is enabled.");
47+
if (stopEndPortalDeletion) plugin().log(" Stop End Portal Deletion is enabled.");
48+
49+
stopBedBombing = config.getBoolean("stopBedBombingInHellBiomes", true);
50+
if (stopBedBombing) plugin().log(" Stop Bed Bombing In Hell Biomes is enabled.");
4151
}
4252

4353
private void wireUpArrays() {
@@ -99,4 +109,8 @@ public ArrayList<Material> getRailArray() {
99109
public ArrayList<Material> getPistonArray() {
100110
return pistonArray;
101111
}
112+
113+
public boolean stopBedBombing() {
114+
return this.stopBedBombing;
115+
}
102116
}

src/main/java/com/programmerdan/minecraft/simpleadminhacks/hacks/Experimental.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,23 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
105105

106106
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
107107
private void monitorTeleportLow(PlayerTeleportEvent event) {
108+
if (!config.isEnabled()) return;
108109
if (!config.isTeleportSpy()) return;
109110
StringBuffer sb = new StringBuffer("[LO] ");
110111
logTeleport(event, sb);
111112
}
112113

113114
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = false)
114115
private void monitorTeleportHigh(PlayerTeleportEvent event) {
116+
if (!config.isEnabled()) return;
115117
if (!config.isTeleportSpy()) return;
116118
StringBuffer sb = new StringBuffer("[HI] ");
117119
logTeleport(event, sb);
118120
}
119121

120122
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
121123
private void monitorTeleportTrack(PlayerPortalEvent event) {
124+
if (!config.isEnabled()) return;
122125
if (!config.isPostTeleportSpy()) return;
123126

124127
final Player player = event.getPlayer();
@@ -194,6 +197,7 @@ private void logPlayer(final Player player, StringBuffer sb) {
194197

195198
@EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false)
196199
private void monitorCombatLow(EntityDamageByEntityEvent event) {
200+
if (!config.isEnabled()) return;
197201
if (!config.isCombatSpy()) return;
198202
StringBuffer sb = new StringBuffer("[LO] ");
199203
logCombat(event, sb);
@@ -219,6 +223,7 @@ private void logCombat(EntityDamageByEntityEvent event, StringBuffer sb) {
219223

220224
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = false)
221225
private void monitorCombatHigh(EntityDamageByEntityEvent event) {
226+
if (!config.isEnabled()) return;
222227
if (!config.isCombatSpy()) return;
223228
StringBuffer sb = new StringBuffer("[HI]: ");
224229
logCombat(event, sb);

0 commit comments

Comments
 (0)