diff --git a/pom.xml b/pom.xml
index 3e187e6..1c2c4bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
com.backtobedrock
AugmentedHardcore
- 3.3.8
+ 3.4.0
jar
8
@@ -75,7 +75,7 @@
org.spigotmc
spigot-api
- 1.19-R0.1-SNAPSHOT
+ 1.20.1-R0.1-SNAPSHOT
provided
@@ -87,7 +87,7 @@
net.wesjd
anvilgui
- 1.6.3-SNAPSHOT
+ 1.9.0-SNAPSHOT
com.zaxxer
@@ -110,7 +110,7 @@
com.tchristofferson
ConfigUpdater
- 2.0-SNAPSHOT
+ 2.1-SNAPSHOT
\ No newline at end of file
diff --git a/src/com/backtobedrock/augmentedhardcore/AugmentedHardcore.java b/src/com/backtobedrock/augmentedhardcore/AugmentedHardcore.java
index c60843e..c91270f 100644
--- a/src/com/backtobedrock/augmentedhardcore/AugmentedHardcore.java
+++ b/src/com/backtobedrock/augmentedhardcore/AugmentedHardcore.java
@@ -17,7 +17,6 @@
import com.backtobedrock.augmentedhardcore.utilities.Metrics;
import com.backtobedrock.augmentedhardcore.utilities.placeholderAPI.PlaceholdersAugmentedHardcore;
import com.tchristofferson.configupdater.ConfigUpdater;
-import org.bukkit.BanList;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -59,11 +58,6 @@ public class AugmentedHardcore extends JavaPlugin implements Listener {
public void onEnable() {
this.initialize();
- //unban patch
- BanList banListName = Bukkit.getBanList(BanList.Type.NAME), banListIP = Bukkit.getBanList(BanList.Type.IP);
- banListName.getBanEntries().stream().filter(e -> e.getSource().equals(this.getDescription().getName())).forEach(e -> banListName.pardon(e.getTarget()));
- banListIP.getBanEntries().stream().filter(e -> e.getSource().equals(this.getDescription().getName())).forEach(e -> banListIP.pardon(e.getTarget()));
-
//update checker
this.updateChecker = new UpdateChecker();
this.updateChecker.start();
diff --git a/src/com/backtobedrock/augmentedhardcore/domain/configurationDomain/ConfigurationDeathBan.java b/src/com/backtobedrock/augmentedhardcore/domain/configurationDomain/ConfigurationDeathBan.java
index 688a858..a35d155 100644
--- a/src/com/backtobedrock/augmentedhardcore/domain/configurationDomain/ConfigurationDeathBan.java
+++ b/src/com/backtobedrock/augmentedhardcore/domain/configurationDomain/ConfigurationDeathBan.java
@@ -8,7 +8,6 @@
import com.backtobedrock.augmentedhardcore.utilities.ConfigUtils;
import org.bukkit.BanList;
import org.bukkit.Bukkit;
-import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.plugin.java.JavaPlugin;
diff --git a/src/com/backtobedrock/augmentedhardcore/domain/enums/DamageCause.java b/src/com/backtobedrock/augmentedhardcore/domain/enums/DamageCause.java
index d89910e..8053381 100644
--- a/src/com/backtobedrock/augmentedhardcore/domain/enums/DamageCause.java
+++ b/src/com/backtobedrock/augmentedhardcore/domain/enums/DamageCause.java
@@ -10,135 +10,140 @@ public enum DamageCause {
"blew up",
"got caught in an explosion"
)
- ), //works
+ ),
CONTACT(4320,
Arrays.asList(
"were pricked to death",
"were poked to death"
)
- ), //works
+ ),
CRAMMING(4320,
Arrays.asList(
"were squished too much",
"were flattened"
)
- ), //works
+ ),
DRAGON_BREATH(2880,
Collections.singletonList(
"were roasted in dragon breath"
)
- ), //unable to replicate in vanilla
+ ),
DROWNING(4320,
Arrays.asList(
"drowned",
"weren't able to find air"
)
- ), //works
+ ),
ENTITY_ATTACK(2880,
Arrays.asList(
"were slain",
"were doomed"
)
- ), //works
+ ),
PLAYER_ENTITY_ATTACK(7200,
Arrays.asList(
"were slain",
"were doomed"
)
- ), //can't test solo
+ ),
ENTITY_EXPLOSION(2880,
Arrays.asList(
"blew up",
"got caught in an explosion",
"went off with a bang"
)
- ), //works
+ ),
PLAYER_ENTITY_EXPLOSION(7200,
Arrays.asList(
"blew up",
"got caught in an explosion",
"went off with a bang"
)
- ), //can't test solo
+ ),
ENTITY_SWEEP_ATTACK(2880,
Arrays.asList(
"were slain during a sweep attack",
"were caught in a sweep attack"
)
- ), //Can't test
+ ),
PLAYER_ENTITY_SWEEP_ATTACK(7200,
Arrays.asList(
"were slain during a sweep attack",
"were caught in a sweep attack"
)
- ), //can't test solo
+ ),
FALL(4320,
Arrays.asList(
"hit the ground too hard",
"fell from a high place",
"fell too far"
)
- ), //works
+ ),
FALLING_BLOCK(4320,
Arrays.asList(
"were squashed",
"were crushed",
"were shattered"
)
- ), //works
+ ),
FIRE(4320,
Arrays.asList(
"went up in flames",
"walked into fire"
)
- ), //works
+ ),
FIRE_TICK(4320,
Arrays.asList(
"burned to death",
"burned to a crisp"
)
- ), //works
+ ),
FLY_INTO_WALL(4320,
Collections.singletonList(
"experienced kinetic energy"
)
- ), //works
- FREEZING(4320,
+ ),
+ FREEZE(4320,
Collections.singletonList("froze to death")
- ),//works
+ ),
HOT_FLOOR(4320,
Arrays.asList(
"discovered the floor was %killer% and hot",
"walked into %killer% and melted"
)
- ), //works
+ ),
+ KILL(0,
+ Arrays.asList(
+ "died",
+ "was killed"
+ )),
LAVA(4320,
Arrays.asList(
"tried to swim in lava",
"lost the floor is lava game"
)
- ), //works
+ ),
LIGHTNING(4320,
Collections.singletonList(
"were struck by"
)
- ), //works
+ ),
MAGIC(2880,
Collections.singletonList(
"were killed with magic"
)
- ), //works
+ ),
PLAYER_MAGIC(7200,
Collections.singletonList(
"were killed with magic"
)
- ), //works
+ ),
POISON(4320,
Arrays.asList(
"drank the wrong potion",
"got injected by poison"
)
- ), //unable to replicate in vanilla
+ ),
PROJECTILE(2880,
Arrays.asList(
"were shot",
@@ -150,25 +155,30 @@ public enum DamageCause {
"were shot",
"were impaled"
)
- ), //works
+ ),
+ SONIC_BOOM(2880,
+ Collections.singletonList(
+ "was obliterated by a sonically-charged shriek"
+ )
+ ),
STARVATION(4320,
Arrays.asList(
"starved to death",
"couldn't find food"
)
- ), //works
+ ),
SUFFOCATION(4320,
Arrays.asList(
"suffocated",
"were too soft for this world"
)
- ), //works
+ ),
SUICIDE(0,
Arrays.asList(
"died",
"committed suicide"
)
- ), //works
+ ),
THORNS(2880,
Collections.singletonList(
"were killed due to deflected damage"
@@ -178,34 +188,39 @@ public enum DamageCause {
Collections.singletonList(
"were killed due to deflected damage"
)
- ), //works
+ ),
VOID(4320,
Arrays.asList(
"fell out of the world",
"didn't want to live in this world anymore",
"were sucked into the void"
)
- ), //works
+ ),
WITHER(2880,
Collections.singletonList(
"withered away"
)
- ), //works
+ ),
+ WORLD_BORDER(0,
+ Collections.singletonList(
+ "left the confines of this world"
+ )
+ ),
COMBAT_LOG(2880,
Collections.singletonList(
"combat logged"
)
- ), //works
+ ),
PLAYER_COMBAT_LOG(7200,
Collections.singletonList(
"combat logged"
)
- ), //works
+ ),
REVIVE(7200,
Collections.singletonList(
"revived"
)
- ); //can't test solo
+ );
private final int defaultBantime;
private final List defaultDisplayMessages;
diff --git a/src/com/backtobedrock/augmentedhardcore/guis/clickActions/ClickActionOpenPlayerSelectionAnvilGui.java b/src/com/backtobedrock/augmentedhardcore/guis/clickActions/ClickActionOpenPlayerSelectionAnvilGui.java
index 217955e..e2d0789 100644
--- a/src/com/backtobedrock/augmentedhardcore/guis/clickActions/ClickActionOpenPlayerSelectionAnvilGui.java
+++ b/src/com/backtobedrock/augmentedhardcore/guis/clickActions/ClickActionOpenPlayerSelectionAnvilGui.java
@@ -4,13 +4,19 @@
import net.wesjd.anvilgui.AnvilGUI;
import org.bukkit.entity.Player;
+import java.util.Collections;
+
public class ClickActionOpenPlayerSelectionAnvilGui extends AbstractClickAction {
@Override
public void execute(Player player) {
new AnvilGUI.Builder()
- .onComplete((playerComplete, text) -> {
- new CommandRevive(playerComplete, new String[]{text}).run();
- return AnvilGUI.Response.text("");
+ .onClick((slot, stateSnapshot) -> {
+ if (slot != AnvilGUI.Slot.OUTPUT) {
+ return Collections.emptyList();
+ }
+
+ new CommandRevive(stateSnapshot.getPlayer(), new String[]{stateSnapshot.getText()}).run();
+ return Collections.singletonList(AnvilGUI.ResponseAction.close());
})
.text("Player Name")
.title("Who needs a revive?")
diff --git a/src/com/backtobedrock/augmentedhardcore/utilities/ConfigUtils.java b/src/com/backtobedrock/augmentedhardcore/utilities/ConfigUtils.java
index efab221..77268ad 100644
--- a/src/com/backtobedrock/augmentedhardcore/utilities/ConfigUtils.java
+++ b/src/com/backtobedrock/augmentedhardcore/utilities/ConfigUtils.java
@@ -3,17 +3,13 @@
import com.backtobedrock.augmentedhardcore.AugmentedHardcore;
import com.backtobedrock.augmentedhardcore.domain.enums.*;
import org.bukkit.BanList;
-import org.bukkit.Bukkit;
import org.bukkit.Material;
-import org.bukkit.World;
import org.bukkit.boss.BarColor;
import org.bukkit.boss.BarStyle;
import org.bukkit.entity.EntityType;
import org.bukkit.plugin.java.JavaPlugin;
-import java.util.List;
import java.util.logging.Level;
-import java.util.stream.Collectors;
public class ConfigUtils {
public static int checkMin(String id, int value, int min) {
diff --git a/src/resources/config.yml b/src/resources/config.yml
index dd6ae39..bf5a718 100644
--- a/src/resources/config.yml
+++ b/src/resources/config.yml
@@ -261,6 +261,13 @@ BanTimes:
- "discovered the floor was %killer% and hot"
- "walked into %killer% and melted"
+ #Death caused by /kill command
+ KILL:
+ BanTime: 0
+ DisplayMessages:
+ - "died"
+ - "was killed"
+
#Death caused by direct exposure to lava
LAVA:
BanTime: 4320
@@ -308,6 +315,12 @@ BanTimes:
- "were shot"
- "were impaled"
+ #Death caused by the Sonic Boom attack from Warden
+ SONIC_BOOM:
+ BanTime: 2880
+ DisplayMessages:
+ - "was obliterated by a sonically-charged shriek"
+
#Death caused by starving due to having an empty hunger bar
STARVATION:
BanTime: 4320
@@ -355,6 +368,12 @@ BanTimes:
DisplayMessages:
- "withered away"
+ #Death caused by the World Border
+ WORLD_BORDER:
+ BanTime: 0
+ DisplayMessages:
+ - "left the confines of this world"
+
#Death caused by combat logging from a monster
COMBAT_LOG:
BanTime: 2880