mirror of
https://github.com/RonanPlugins/BetterRTP.git
synced 2026-04-04 23:16:02 +00:00
command after fix for addons reload + locations finalized
This commit is contained in:
@@ -2,6 +2,7 @@ package me.SuperRonanCraft.BetterRTP.player.commands;
|
||||
|
||||
import me.SuperRonanCraft.BetterRTP.BetterRTP;
|
||||
import me.SuperRonanCraft.BetterRTP.player.commands.types.CmdTeleport;
|
||||
import me.SuperRonanCraft.BetterRTP.references.customEvents.RTP_CommandEvent_After;
|
||||
import me.SuperRonanCraft.BetterRTP.references.helpers.HelperRTP;
|
||||
import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownData;
|
||||
import me.SuperRonanCraft.BetterRTP.references.rtpinfo.CooldownHandler;
|
||||
@@ -50,6 +51,7 @@ public class Commands {
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (!event.isCancelled())
|
||||
cmd.execute(sendi, label, args);
|
||||
Bukkit.getServer().getPluginManager().callEvent(new RTP_CommandEvent_After(sendi, cmd));
|
||||
} else
|
||||
pl.getText().getNoPermission(sendi);
|
||||
return;
|
||||
|
||||
@@ -12,6 +12,7 @@ public class RTP_CommandEvent extends RTPEvent implements Cancellable {
|
||||
RTPCommand cmd;
|
||||
private static final HandlerList handler = new HandlerList();
|
||||
|
||||
//Called before a command is executed
|
||||
public RTP_CommandEvent(CommandSender sendi, RTPCommand cmd) {
|
||||
this.sendi = sendi;
|
||||
this.cmd = cmd;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package me.SuperRonanCraft.BetterRTP.references.customEvents;
|
||||
|
||||
import me.SuperRonanCraft.BetterRTP.player.commands.RTPCommand;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class RTP_CommandEvent_After extends RTP_CommandEvent {
|
||||
|
||||
//Executed after a command was executed
|
||||
public RTP_CommandEvent_After(CommandSender sendi, RTPCommand cmd) {
|
||||
super(sendi, cmd);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
Enabled: false #enable the locations feature
|
||||
RequirePermission: false #Require players to have `betterrtp.location.<world_name>`
|
||||
UseLocationIfAvailable: false #Will choose a location upon `/rtp` if location(s) is available in the world
|
||||
UseLocationIfAvailable: true #Will choose a location upon `/rtp` if location(s) is available in the world
|
||||
#OnlyAllowInWorld: true #Only allow players to use locations that correspond to the world they are standing in
|
||||
|
||||
Locations:
|
||||
|
||||
Reference in New Issue
Block a user