mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 11:15:24 +01:00
Fix an issue when CommandEvents were never called (#1542)
Somebody forgot to actually call the this event.
This commit is contained in:
parent
f25e4d9c8d
commit
6b852e0368
@ -1,5 +1,6 @@
|
||||
package world.bentobox.bentobox.api.events.command;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.Cancellable;
|
||||
@ -60,7 +61,9 @@ public class CommandEvent extends BentoBoxEvent implements Cancellable {
|
||||
}
|
||||
|
||||
public CommandEvent build() {
|
||||
return new CommandEvent(sender, command, label, args);
|
||||
CommandEvent event = new CommandEvent(sender, command, label, args);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user