mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-29 04:04:43 +02:00
Starting to convert commands to a smarter system :3
This commit is contained in:
@ -31,6 +31,7 @@ import com.intellectualcrafters.plot.PS;
|
||||
import com.intellectualcrafters.plot.config.C;
|
||||
import com.intellectualcrafters.plot.config.Settings;
|
||||
import com.intellectualcrafters.plot.database.DBFunc;
|
||||
import com.intellectualsites.commands.callers.CommandCaller;
|
||||
import com.plotsquared.bukkit.listeners.PlotListener;
|
||||
import com.intellectualcrafters.plot.object.BlockLoc;
|
||||
import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
@ -1421,6 +1422,15 @@ public class MainUtil {
|
||||
return sendMessage(plr, msg, true);
|
||||
}
|
||||
|
||||
public static boolean sendCallerMessage(final CommandCaller plr, final String msg) {
|
||||
if (plr.getSuperCaller() instanceof PlotPlayer) {
|
||||
sendMessage((PlotPlayer) plr.getSuperCaller(), msg);
|
||||
} else {
|
||||
sendConsoleMessage(msg);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void sendConsoleMessage(String msg) {
|
||||
sendMessage(null, msg);
|
||||
}
|
||||
@ -1507,6 +1517,15 @@ public class MainUtil {
|
||||
return lines.toArray(new String[lines.size()]);
|
||||
}
|
||||
|
||||
public static boolean sendCallerMessage(final CommandCaller caller, final C c, final String... args) {
|
||||
if (caller.getSuperCaller() instanceof PlotPlayer) {
|
||||
sendMessage((PlotPlayer) caller.getSuperCaller(), c, args);
|
||||
} else {
|
||||
sendConsoleMessage(c, args);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a message to the player
|
||||
*
|
||||
|
Reference in New Issue
Block a user