Skip to content

Commit 2c964c3

Browse files
Fibernator, and Fast Drop Fixes
1 parent 5c44ebc commit 2c964c3

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

React/src/main/java/com/volmit/react/content/tweak/TweakFastDrops.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public TweakFastDrops() {
5454
super(ID);
5555
}
5656

57-
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
57+
@EventHandler(priority = EventPriority.MONITOR)
5858
public void on(EntityDeathEvent e) {
5959
if (!teleportEntityXP && !teleportEntityDrops) {
6060
return;
@@ -100,7 +100,7 @@ public void on(EntityDeathEvent e) {
100100
}
101101
}
102102

103-
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
103+
@EventHandler(priority = EventPriority.MONITOR)
104104
public void on(BlockDropItemEvent e) {
105105
if (!allowContainerDrops && e.getBlock().getState() instanceof InventoryHolder) {
106106
return;
@@ -127,7 +127,7 @@ public void on(BlockDropItemEvent e) {
127127
}
128128
}
129129

130-
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
130+
@EventHandler(priority = EventPriority.MONITOR)
131131
public void on(BlockBreakEvent e) {
132132
if (!teleportBlockXP) {
133133
return;
@@ -149,6 +149,8 @@ public void on(BlockBreakEvent e) {
149149
}
150150
}
151151

152+
153+
152154
public void giveXP(Location at, Player player, int xp) {
153155
if (player.getGameMode().equals(GameMode.CREATIVE)) {
154156
return;

React/src/main/java/com/volmit/react/content/tweak/TweakServerHibernator.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
public class TweakServerHibernator extends ReactTweak implements Listener {
2828
public static final String ID = "server-hibernator";
2929
private transient boolean firstRun = true;
30+
private boolean imACloudServerEnableMe = false;
3031
private double secondsPerTick = 1.0;
3132

3233

@@ -36,6 +37,10 @@ public TweakServerHibernator() {
3637

3738
@Override
3839
public void onActivate() {
40+
if (!imACloudServerEnableMe) {
41+
React.info("React Server Hibernator Disabled. Enable imACloudServerEnableMe in the config, if you know what you are doing.");
42+
return;
43+
}
3944
Bukkit.getScheduler().scheduleSyncRepeatingTask(React.instance, () -> {
4045
if (Bukkit.getOnlinePlayers().size() == 0) {
4146
if (this.firstRun) {
@@ -60,8 +65,11 @@ public void onActivate() {
6065

6166
@Override
6267
public void onDeactivate() {
68+
if (!imACloudServerEnableMe) {
69+
React.info("React Server Hibernator Disabled. Enable imACloudServerEnableMe in the config, if you know what you are doing.");
70+
return;
71+
}
6372
Bukkit.getScheduler().cancelTasks(React.instance);
64-
6573
}
6674

6775
@Override

0 commit comments

Comments
 (0)