Skip to content

Commit

Permalink
nullチェック追加 Versionを2.0.0に
Browse files Browse the repository at this point in the history
  • Loading branch information
Arisa9006 committed Aug 12, 2024
1 parent 6b17183 commit 2d611bf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>net.azisaba</groupId>
<artifactId>LeonGunWar</artifactId>
<version>1.4.6</version>
<version>2.0.0</version>

<name>${project.artifactId}</name>
<description>A core plugin in Azisaba LeonGunWar</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ public void onInventoryClick(InventoryClickEvent event) {
if (!(event.getWhoClicked() instanceof Player)) {
return;
}
if (LeonGunWar.getPlugin().getManager().getCurrentGameMap().getSpawnPoint(LeonGunWar.getPlugin().getManager().getBattleTeam((Player) event.getWhoClicked()))!=null) {
Location spawnPoint = LeonGunWar.getPlugin().getManager().getCurrentGameMap().getSpawnPoint(LeonGunWar.getPlugin().getManager().getBattleTeam((Player) event.getWhoClicked()));
if (spawnPoint.distance(event.getWhoClicked().getLocation()) <= 10) {
return;
if(LeonGunWar.getPlugin().getManager().getCurrentGameMap() != null) {
if (LeonGunWar.getPlugin().getManager().getCurrentGameMap().getSpawnPoint(LeonGunWar.getPlugin().getManager().getBattleTeam((Player) event.getWhoClicked())) != null) {
Location spawnPoint = LeonGunWar.getPlugin().getManager().getCurrentGameMap().getSpawnPoint(LeonGunWar.getPlugin().getManager().getBattleTeam((Player) event.getWhoClicked()));
if (spawnPoint.distance(event.getWhoClicked().getLocation()) <= 10) {
return;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ${project.name}
main: net.azisaba.lgw.core.LeonGunWar
version: ${project.version}
authors: ["siloneco", "YukiLeafX"]
authors: ["siloneco", "YukiLeafX", "matsu1213", "Arisa9006"]
description: ${project.description}
website: ${project.url}
depend: ["CrackShot", "Essentials", "WorldGuard", "PlayerSettings", "KDStatusReloaded"]
Expand Down

0 comments on commit 2d611bf

Please sign in to comment.