-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Release 2.0.7.3 Changes * Added check to exclude shops of `buying` shops for owners who don't have enough money. * Hideshop/revealshop should work with double chests also * Bentobox integration to ignore shops in locked islands * jdk upgraded to 21, bentobox build failure fix (#61) * bentobox build failure fix 1 * updated maven.yml * jdk upgraded to 21, bentobox build failure fix --------- Co-authored-by: myzticbean <[email protected]>
- Loading branch information
1 parent
6f7e0ff
commit 4712cab
Showing
13 changed files
with
202 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/io/myzticbean/finditemaddon/dependencies/BentoBoxPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.myzticbean.finditemaddon.dependencies; | ||
|
||
import org.bukkit.Location; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.plugin.Plugin; | ||
|
||
import world.bentobox.bentobox.BentoBox; | ||
import world.bentobox.bentobox.lists.Flags; | ||
|
||
public class BentoBoxPlugin { | ||
|
||
private boolean isBentoBoxEnabled = false; | ||
|
||
public BentoBoxPlugin() { | ||
checkBentoBoxPlugin(); | ||
} | ||
|
||
private void checkBentoBoxPlugin() { | ||
Plugin plugin = Bukkit.getPluginManager().getPlugin("BentoBox"); | ||
isBentoBoxEnabled = plugin != null && plugin.isEnabled(); | ||
} | ||
|
||
public boolean isIslandLocked(Location loc) { | ||
if (!isBentoBoxEnabled) { | ||
return false; | ||
} | ||
return BentoBox.getInstance() | ||
.getIslands() | ||
.getIslandAt(loc) | ||
.filter(island -> !island.isAllowed(Flags.LOCK)) | ||
.isPresent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.