mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 18:39:44 -05:00
sendMessage -> sendDirectMessage
This commit is contained in:
1 parent
e92d213fb0
commit
481f2f1a2b
3 files changed
+41
-2
No files matched your search
+20
-1
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* This file is a part of project QuickShop, the name is ConsoleOnlyCommandProcessor.java
|
||||
* Copyright (C) PotatoCraft Studio and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.maxgamer.quickshop.command.processor;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -11,7 +30,7 @@ public abstract class ConsoleOnlyCommandProcessor implements ICommandProcessor {
|
||||
if (sender instanceof ConsoleCommandSender) {
|
||||
onCommand((ConsoleCommandSender) sender, commandLabel, cmdArg);
|
||||
} else {
|
||||
MsgUtil.sendMessage(sender, "This command is console only!");
|
||||
MsgUtil.sendDirectMessage(sender, "This command is console only!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-1
@@ -1,3 +1,22 @@
|
||||
/*
|
||||
* This file is a part of project QuickShop, the name is PlayerOnlyCommandProcessor.java
|
||||
* Copyright (C) PotatoCraft Studio and contributors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.maxgamer.quickshop.command.processor;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
@@ -10,7 +29,7 @@ public abstract class PlayerOnlyCommandProcessor implements ICommandProcessor {
|
||||
if (sender instanceof Player) {
|
||||
onCommand((Player) sender, commandLabel, cmdArg);
|
||||
} else {
|
||||
MsgUtil.sendMessage(sender, "This command is player only!");
|
||||
MsgUtil.sendDirectMessage(sender, "This command is player only!");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ public class MsgUtil {
|
||||
for (String msg : msgs) {
|
||||
if (p.getPlayer() != null) {
|
||||
Util.debugLog("Accepted the msg for player " + p.getName() + " : " + msg);
|
||||
// TODO: Use json message instead ########## stupid thing
|
||||
String[] msgData = msg.split("##########");
|
||||
if (msgData.length == 3) {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user