Skip to content

Commit 4384861

Browse files
Fixes #57
1 parent d1e4741 commit 4384861

File tree

2 files changed

+90
-82
lines changed

2 files changed

+90
-82
lines changed

src/main/java/io/github/thebusybiscuit/sensibletoolbox/SensibleToolboxPlugin.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.bukkit.plugin.java.JavaPlugin;
2121
import org.bukkit.scheduler.BukkitTask;
2222

23+
import com.comphenix.protocol.ProtocolLib;
2324
import com.comphenix.protocol.ProtocolLibrary;
2425

2526
import io.github.thebusybiscuit.cscorelib2.protection.ProtectionManager;
@@ -442,6 +443,7 @@ public void registerItems() {
442443
if (isProtocolLibEnabled()) {
443444
itemRegistry.registerItem(new SoundMuffler(), this, configPrefix, permissionNode);
444445
}
446+
445447
if (isHolographicDisplaysEnabled()) {
446448
itemRegistry.registerItem(new HolographicMonitor(), this, configPrefix, permissionNode);
447449
}
@@ -469,10 +471,11 @@ private void registerEventListeners() {
469471
private void setupProtocolLib() {
470472
Plugin pLib = getServer().getPluginManager().getPlugin("ProtocolLib");
471473

472-
if (pLib != null && pLib.isEnabled() && pLib instanceof ProtocolLibrary) {
474+
if (pLib instanceof ProtocolLib && pLib.isEnabled()) {
473475
protocolLibEnabled = true;
474476
Debugger.getInstance().debug("Hooked ProtocolLib v" + pLib.getDescription().getVersion());
475477
}
478+
476479
if (protocolLibEnabled) {
477480
if (getConfig().getBoolean("options.glowing_items")) {
478481
ItemGlow.init(this);

src/main/resources/plugin.yml

+86-81
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,94 @@
11
name: SensibleToolbox
22
description: A collection of generally useful tools and utilites
3-
authors: [desht, TheBusyBiscuit]
4-
main: io.github.thebusybiscuit.sensibletoolbox.SensibleToolboxPlugin
5-
softdepend: [ ProtocolLib, HolographicDisplays, Slimefun, ExoticGarden ]
63

7-
version: ${project.version}
4+
authors:
5+
- desht
6+
- TheBusyBiscuit
7+
8+
main: io.github.thebusybiscuit.sensibletoolbox.SensibleToolboxPlugin
89
api-version: 1.14
10+
version: ${project.version}
11+
12+
softdepend:
13+
- ProtocolLib
14+
- HolographicDisplays
15+
- Slimefun
16+
- ExoticGarden
917

1018
commands:
11-
stb:
12-
description: Sensible Toolbox Commands
13-
usage: (Usage text is generated by the plugin itself)
19+
stb:
20+
description: Sensible Toolbox Commands
21+
usage: (Usage text is generated by the plugin itself)
1422

1523
permissions:
16-
stb.admin:
17-
description: Grants all admin permissions for Sensible Toolbox
18-
default: op
19-
children:
20-
stb.access.any: true
21-
stb.commands.charge: true
22-
stb.commands.debug: true
23-
stb.commands.getcfg: true
24-
stb.commands.rename.free: true
25-
stb.commands.save: true
26-
stb.commands.show: true
27-
stb.commands.setcfg: true
28-
stb.commands.validate: true
29-
stb.recipebook.freefab: true
30-
stb.access.any:
31-
description: Allow a block's access control settings to be ignored
32-
default: op
33-
stb.access.modify:
34-
description: Allow a block's access control settings to be changed
35-
default: op
36-
stb.friends.other:
37-
description: Allow viewing/modification of other players' friend data
38-
default: op
39-
stb.recipebook.freefab:
40-
description: Allow any item in the Recipe Book to be fabricated with no ingredient cost
41-
default: op
42-
stb.enderleash.captureany:
43-
description: Allow capturing of animals owned by other players
44-
default: op
45-
stb.enderaccess.creative:
46-
description: Allow players to access ender inventories in creative mode, even if config denies it
47-
default: op
48-
stb.commands.charge:
49-
description: Allow the SCU values for blocks/items to be modified with /stb charge
50-
default: op
51-
stb.commands.debug:
52-
description: Allow plugin debugging to be toggled with /stb debug
53-
default: op
54-
stb.commands.examine:
55-
description: Allow item data to be examined in detail with /stb debug
56-
default: op
57-
stb.commands.getcfg:
58-
description: Allows the plugin configuration to be inspected with /stb getcfg
59-
default: op
60-
stb.commands.getcfg:
61-
description: Allows STB items & blocks to be obtained with /stb give
62-
default: op
63-
stb.commands.recipe:
64-
description: Allows recipes to be searched for by name with /stb recipe
65-
default: true
66-
stb.commands.rename:
67-
description: Allow animal captured in the Ender Leash to be renamed with /stb rename
68-
default: true
69-
stb.commands.rename.free:
70-
description: Allow animal renaming for no experience cost with /stb rename
71-
default: op
72-
stb.commands.save:
73-
description: Allow the plugin data to be force-saved with /stb save
74-
default: op
75-
stb.commands.setcfg:
76-
description: Allows the plugin configuration to be modified with /stb setcfg
77-
default: op
78-
stb.commands.show:
79-
description: Allows existing STB blocks to be listed and inspected with /stb show
80-
default: op
81-
stb.commands.friend:
82-
description: Allow friend information to be viewed/modified with /stb friend
83-
default: true
84-
stb.commands.unfriend:
85-
description: Allow friends to be removed with /stb unfriend
86-
default: true
87-
stb.commands.validate:
88-
description: Allow STB block data to be validated/fixed with /stb validate
89-
default: op
24+
stb.admin:
25+
description: Grants all admin permissions for Sensible Toolbox
26+
default: op
27+
children:
28+
stb.access.any: true
29+
stb.commands.charge: true
30+
stb.commands.debug: true
31+
stb.commands.getcfg: true
32+
stb.commands.rename.free: true
33+
stb.commands.save: true
34+
stb.commands.show: true
35+
stb.commands.setcfg: true
36+
stb.commands.validate: true
37+
stb.recipebook.freefab: true
38+
stb.access.any:
39+
description: Allow a block's access control settings to be ignored
40+
default: op
41+
stb.access.modify:
42+
description: Allow a block's access control settings to be changed
43+
default: op
44+
stb.friends.other:
45+
description: Allow viewing/modification of other players' friend data
46+
default: op
47+
stb.recipebook.freefab:
48+
description: Allow any item in the Recipe Book to be fabricated with no ingredient cost
49+
default: op
50+
stb.enderleash.captureany:
51+
description: Allow capturing of animals owned by other players
52+
default: op
53+
stb.enderaccess.creative:
54+
description: Allow players to access ender inventories in creative mode, even if config denies it
55+
default: op
56+
stb.commands.charge:
57+
description: Allow the SCU values for blocks/items to be modified with /stb charge
58+
default: op
59+
stb.commands.debug:
60+
description: Allow plugin debugging to be toggled with /stb debug
61+
default: op
62+
stb.commands.examine:
63+
description: Allow item data to be examined in detail with /stb debug
64+
default: op
65+
stb.commands.getcfg:
66+
description: Allows STB items & blocks to be obtained with /stb give
67+
default: op
68+
stb.commands.recipe:
69+
description: Allows recipes to be searched for by name with /stb recipe
70+
default: true
71+
stb.commands.rename:
72+
description: Allow animal captured in the Ender Leash to be renamed with /stb rename
73+
default: true
74+
stb.commands.rename.free:
75+
description: Allow animal renaming for no experience cost with /stb rename
76+
default: op
77+
stb.commands.save:
78+
description: Allow the plugin data to be force-saved with /stb save
79+
default: op
80+
stb.commands.setcfg:
81+
description: Allows the plugin configuration to be modified with /stb setcfg
82+
default: op
83+
stb.commands.show:
84+
description: Allows existing STB blocks to be listed and inspected with /stb show
85+
default: op
86+
stb.commands.friend:
87+
description: Allow friend information to be viewed/modified with /stb friend
88+
default: true
89+
stb.commands.unfriend:
90+
description: Allow friends to be removed with /stb unfriend
91+
default: true
92+
stb.commands.validate:
93+
description: Allow STB block data to be validated/fixed with /stb validate
94+
default: op

0 commit comments

Comments
 (0)