mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
Fixed empty check in PluginCommand
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
81023892fe
commit
f0ab429e01
2 changed files with 1 additions and 4 deletions
|
@ -1,7 +1,5 @@
|
|||
package org.bukkit.command;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
@ -17,7 +15,7 @@ public final class PluginCommand extends Command {
|
|||
|
||||
public boolean execute(Player player, String commandLabel, String[] args) {
|
||||
boolean cmdSuccess = owningPlugin.onCommand(player, this, commandLabel, args);
|
||||
if (!cmdSuccess && usageMessage != "") {
|
||||
if (!cmdSuccess && !usageMessage.isEmpty()) {
|
||||
String tmpMsg = usageMessage.replace("<command>", commandLabel);
|
||||
String[] usageLines = tmpMsg.split("\\n");
|
||||
for(String line: usageLines) {
|
||||
|
|
|
@ -217,7 +217,6 @@ public final class SimplePluginManager implements PluginManager {
|
|||
*/
|
||||
public void registerEvent(Event.Type type, Listener listener, Priority priority, Plugin plugin) {
|
||||
PriorityQueue<RegisteredListener> eventListeners = listeners.get(type);
|
||||
int position = 0;
|
||||
|
||||
if (eventListeners == null) {
|
||||
eventListeners = new PriorityQueue<RegisteredListener>(11,
|
||||
|
|
Loading…
Reference in a new issue