Skip to content

Commit

Permalink
Merge branch '2.x' of https://github.com/EssentialsX/Essentials into …
Browse files Browse the repository at this point in the history
…randomteleport-improvements
  • Loading branch information
pop4959 committed Dec 28, 2021
2 parents 6d3340e + 739600e commit e4e1bbb
Show file tree
Hide file tree
Showing 17 changed files with 191 additions and 760 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 2.x
- dev/*

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- 2.x
- mc/*
- dev/*

jobs:
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ public boolean onCommandEssentials(final CommandSender cSender, final Command co
if (getSettings().isCommandDisabled(commandLabel)) {
if (getKnownCommandsProvider().getKnownCommands().containsKey(commandLabel)) {
final Command newCmd = getKnownCommandsProvider().getKnownCommands().get(commandLabel);
if (!(newCmd instanceof PluginIdentifiableCommand) || ((PluginIdentifiableCommand) newCmd).getPlugin() != this) {
if (!(newCmd instanceof PluginIdentifiableCommand) || !isEssentialsPlugin(((PluginIdentifiableCommand) newCmd).getPlugin())) {
return newCmd.execute(cSender, commandLabel, args);
}
}
Expand Down Expand Up @@ -821,6 +821,10 @@ public boolean onCommandEssentials(final CommandSender cSender, final Command co
}
}

private boolean isEssentialsPlugin(Plugin plugin) {
return plugin.getDescription().getMain().contains("com.earth2me.essentials") || plugin.getDescription().getMain().contains("net.essentialsx");
}

public void cleanupOpenInventories() {
for (final User user : getOnlineUsers()) {
if (user.isRecipeSee()) {
Expand Down
Loading

0 comments on commit e4e1bbb

Please sign in to comment.