-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add support for PluginIdentifiableCommands.
- Loading branch information
Showing
2 changed files
with
50 additions
and
3 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
26 changes: 26 additions & 0 deletions
26
bukkit/commandmap/src/main/java/bukkit/PluginBukkitCommandWrapper.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,26 @@ | ||
package bukkit; | ||
|
||
import org.bukkit.command.PluginIdentifiableCommand; | ||
import org.bukkit.plugin.Plugin; | ||
import team.unnamed.commandflow.bukkit.BukkitCommandManager; | ||
import team.unnamed.commandflow.command.Command; | ||
import team.unnamed.commandflow.translator.Translator; | ||
|
||
public class PluginBukkitCommandWrapper extends BukkitCommandWrapper implements PluginIdentifiableCommand { | ||
|
||
private final Plugin plugin; | ||
|
||
public PluginBukkitCommandWrapper(Command command, | ||
BukkitCommandManager dispatcher, | ||
Translator translator, | ||
Plugin plugin) { | ||
super(command, dispatcher, translator); | ||
|
||
this.plugin = plugin; | ||
} | ||
|
||
@Override | ||
public Plugin getPlugin() { | ||
return plugin; | ||
} | ||
} |