Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei1058 committed Nov 10, 2023
2 parents 7d837b3 + 8e66b27 commit 6264a2c
Show file tree
Hide file tree
Showing 38 changed files with 1,191 additions and 46 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/compile_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
name: development
url: https://repo.andrei1058.dev
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '19.0.2+7'
distribution: 'adopt'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: production
url: https://repo.andrei1058.com
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '19.0.2+7'
distribution: 'adopt'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
name: development
url: https://repo.andrei1058.dev
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '19.0.2+7'
distribution: 'adopt'
Expand Down
2 changes: 1 addition & 1 deletion bedwars-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bedwars-api</artifactId>
Expand Down
19 changes: 12 additions & 7 deletions bedwars-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>bedwars-plugin</artifactId>
Expand Down Expand Up @@ -94,13 +94,13 @@
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>de.simonsator</groupId>
<artifactId>DevelopmentPAFSpigot</artifactId>
<version>1.0.67</version>
<version>1.0.239</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -187,6 +187,11 @@
<artifactId>versionsupport_v1_20_R1</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.andrei1058.bedwars</groupId>
<artifactId>versionsupport_v1_20_R2</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.andrei1058.bedwars</groupId>
<artifactId>versionsupport-common</artifactId>
Expand All @@ -201,7 +206,7 @@
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.11.2</version>
<version>2.11.3</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -214,7 +219,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.13.0</version>
<optional>true</optional>
</dependency>
<!-- https://mvnrepository.com/artifact/com.zaxxer/HikariCP -->
Expand All @@ -234,7 +239,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.6</version>
<version>2.0.7</version>
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -336,7 +341,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.1</version>
<version>3.5.0</version>
<configuration>
<relocations>
<relocation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,13 +391,13 @@ public static boolean isBuildProtected(Location l, IArena a) {
}
for (ITeam t : a.getTeams()) {
for (IGenerator o : t.getGenerators()) {
if (o.getLocation().distance(l) <= 1) {
if (o.getLocation().distance(l) <= a.getConfig().getInt(ConfigPath.ARENA_GENERATOR_PROTECTION)) {
return true;
}
}
}
for (IGenerator o : a.getOreGenerators()) {
if (o.getLocation().distance(l) <= 1) {
if (o.getLocation().distance(l) <= a.getConfig().getInt(ConfigPath.ARENA_GENERATOR_PROTECTION)) {
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public OreGenerator(Location location, IArena arena, GeneratorType type, ITeam b
loadDefaults();
BedWars.debug("Initializing new generator at: " + location + " - " + type + " - " + (bwt == null ? "NOTEAM" : bwt.getName()));

Cuboid c = new Cuboid(location, 1, true);
Cuboid c = new Cuboid(location, getArena().getConfig().getInt(ConfigPath.ARENA_GENERATOR_PROTECTION), true);
c.setMaxY(c.getMaxY() + 5);
c.setMinY(c.getMinY() - 2);
arena.getRegionsList().add(c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,23 @@ public void onPlace(BlockPlaceEvent event) {
public void inventorySwitch(InventoryCloseEvent event) {
Player player = (Player) event.getPlayer();
IArena arena = Arena.getArenaByPlayer(player);
if (arena == null || !arena.isPlayer(player) || arena.isSpectator(player)) return;

// Ensure the player is in an arena, is not a spectator, and is indeed a player
if (arena == null || !arena.isPlayer(player) || arena.isSpectator(player)) {
return;
}

boolean hasTnt = player.getInventory().contains(Material.TNT);

if (instance.playersWithTnt.contains(player)) {
if (player.getInventory().contains(Material.TNT)) return;
instance.playersWithTnt.remove(player);
} else if (!instance.playersWithTnt.contains(player)) {
if (!player.getInventory().contains(Material.TNT)) return;
instance.playersWithTnt.add(player);
if (!hasTnt) {
instance.playersWithTnt.remove(player);
}
} else {
if (hasTnt) {
instance.playersWithTnt.add(player);
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ public void spawnNPCs() {
nms.spawnShop(getArena().getConfig().getArenaLoc("Team." + getName() + ".Shop"), (getArena().getMaxInTeam() > 1 ? Messages.NPC_NAME_TEAM_SHOP : Messages.NPC_NAME_SOLO_SHOP), getArena().getPlayers(), getArena());
}, 20L);

Cuboid c1 = new Cuboid(getArena().getConfig().getArenaLoc("Team." + getName() + ".Upgrade"), 1, true);
Cuboid c1 = new Cuboid(getArena().getConfig().getArenaLoc("Team." + getName() + ".Upgrade"), getArena().getConfig().getInt(ConfigPath.ARENA_UPGRADES_PROTECTION), true);
c1.setMinY(c1.getMinY() - 1);
c1.setMaxY(c1.getMaxY() + 4);
getArena().getRegionsList().add(c1);

Cuboid c2 = new Cuboid(getArena().getConfig().getArenaLoc("Team." + getName() + ".Shop"), 1, true);
Cuboid c2 = new Cuboid(getArena().getConfig().getArenaLoc("Team." + getName() + ".Shop"), getArena().getConfig().getInt(ConfigPath.ARENA_SHOP_PROTECTION), true);
c2.setMinY(c2.getMinY() - 1);
c2.setMaxY(c2.getMaxY() + 4);
getArena().getRegionsList().add(c2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
package com.andrei1058.bedwars.commands.bedwars.subcmds.sensitive;

import com.andrei1058.bedwars.BedWars;
import com.andrei1058.bedwars.api.arena.GameState;
import com.andrei1058.bedwars.api.arena.IArena;
import com.andrei1058.bedwars.api.command.ParentCommand;
import com.andrei1058.bedwars.api.command.SubCommand;
Expand Down Expand Up @@ -66,6 +67,10 @@ public boolean execute(String[] args, CommandSender s) {
p.sendMessage("§c▪ §7This arena is disabled yet!");
return true;
}
if (a.getStatus() == GameState.playing) {
p.sendMessage("§6 ▪ §7There is a game running on this Arena, please disable after the game!");
return true;
}
p.sendMessage("§6 ▪ §7Disabling arena...");
a.disable();
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
public class PAF implements Party {
//Party and Friends for Spigot Support by JT122406
private PlayerParty getPAFParty(Player p) {
if (PAFPlayerManager.getInstance() == null) return null;
return PartyManager.getInstance().getParty(PAFPlayerManager.getInstance().getPlayer(p));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class PAFBungeecordRedisApi implements Party {
//Party and Friends Extended for BungeeCord Support by JT122406

private PlayerParty getPAFParty(Player p) {
if (PAFPlayerManager.getInstance() == null) return null;
return PartyManager.getInstance().getParty(PAFPlayerManager.getInstance().getPlayer(p.getUniqueId()));
}

Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.andrei1058.bedwars</groupId>
<artifactId>BedWars1058</artifactId>
<packaging>pom</packaging>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -46,7 +46,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
<version>2.13.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -112,6 +112,7 @@
<module>versionsupport_v1_19_R2</module>
<module>versionsupport_v1_19_R3</module>
<module>versionsupport_v1_20_R1</module>
<module>versionsupport_v1_20_R2</module>
</modules>

<distributionManagement>
Expand Down
2 changes: 1 addition & 1 deletion resetadapter_aswm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>resetadapter-aswm</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion resetadapter_slime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>resetadapter-slime</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion resetadapter_slimepaper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>resetadapter-slimepaper</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_1_12_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static LivingEntity spawn(Location loc, ITeam team, double speed, double
customEnt.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(speed);
customEnt.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(damage);
((CraftLivingEntity)customEnt.getBukkitEntity()).setRemoveWhenFarAway(false);
customEnt.setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_IRON_GOLEM_NAME)
customEnt.setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_SILVERFISH_NAME)
.replace("{despawn}", String.valueOf(despawn)
.replace("{health}", StringUtils.repeat(Language.getDefaultLanguage().m(Messages.FORMATTING_DESPAWNABLE_UTILITY_NPC_HEALTH)+" ", 10))
.replace("{TeamColor}", team.getColor().chat().toString())));
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_1_8_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>versionsupport_1_8_R3</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static LivingEntity spawn(Location loc, ITeam team, double speed, double
customEnt.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(speed);
customEnt.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).setValue(damage);
((CraftLivingEntity)customEnt.getBukkitEntity()).setRemoveWhenFarAway(false);
customEnt.setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_IRON_GOLEM_NAME)
customEnt.setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_SILVERFISH_NAME)
.replace("{despawn}", String.valueOf(despawn)
.replace("{health}", StringUtils.repeat(Language.getDefaultLanguage().m(Messages.FORMATTING_DESPAWNABLE_UTILITY_NPC_HEALTH)+" ", 10))
.replace("{TeamColor}", team.getColor().chat().toString())));
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion versionsupport_v1_16_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static LivingEntity spawn(Location loc, ITeam team, double speed, double
((CraftLivingEntity)customEnt.getBukkitEntity()).setRemoveWhenFarAway(false);
customEnt.setCustomNameVisible(true);
mcWorld.addEntity(customEnt, CreatureSpawnEvent.SpawnReason.CUSTOM);
customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_IRON_GOLEM_NAME)
customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_SILVERFISH_NAME)
.replace("{despawn}", String.valueOf(despawn)
.replace("{health}", StringUtils.repeat(Language.getDefaultLanguage().m(Messages.FORMATTING_DESPAWNABLE_UTILITY_NPC_HEALTH)+" ", 10))
.replace("{TeamColor}", team.getColor().chat().toString())));
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_v1_17_R1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static LivingEntity spawn(Location loc, ITeam team, double speed, double
((CraftLivingEntity)customEnt.getBukkitEntity()).setRemoveWhenFarAway(false);
customEnt.setCustomNameVisible(true);
mcWorld.addEntity(customEnt, CreatureSpawnEvent.SpawnReason.CUSTOM);
customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_IRON_GOLEM_NAME)
customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_SILVERFISH_NAME)
.replace("{despawn}", String.valueOf(despawn)
.replace("{health}", StringUtils.repeat(Language.getDefaultLanguage().m(Messages.FORMATTING_DESPAWNABLE_UTILITY_NPC_HEALTH)+" ", 10))
.replace("{TeamColor}", team.getColor().chat().toString())));
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_v1_18_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BedWars1058</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static LivingEntity spawn(Location loc, ITeam team, double speed, double
((CraftLivingEntity) customEnt.getBukkitEntity()).setRemoveWhenFarAway(true);
((CraftLivingEntity) customEnt.getBukkitEntity()).setPersistent(true);

customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_IRON_GOLEM_NAME)
customEnt.getBukkitEntity().setCustomName(Language.getDefaultLanguage().m(Messages.SHOP_UTILITY_NPC_SILVERFISH_NAME)
.replace("{despawn}", String.valueOf(despawn)
.replace("{health}", StringUtils.repeat(Language.getDefaultLanguage().m(Messages.FORMATTING_DESPAWNABLE_UTILITY_NPC_HEALTH) + " ", 10))
.replace("{TeamColor}", team.getColor().chat().toString())));
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_v1_19_R2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.andrei1058.bedwars</groupId>
<artifactId>BedWars1058</artifactId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>versionsupport_v1_19_R2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion versionsupport_v1_19_R3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.andrei1058.bedwars</groupId>
<artifactId>BedWars1058</artifactId>
<version>23.10-SNAPSHOT</version>
<version>23.10.1-SNAPSHOT</version>
</parent>

<artifactId>versionsupport_v1_19_R3</artifactId>
Expand Down
Loading

0 comments on commit 6264a2c

Please sign in to comment.