1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-30 19:40:37 +01:00

Added null check and removed unused method from Fillr

By: VictorD <victor.danell@gmail.com>
This commit is contained in:
Bukkit/Spigot 2011-01-16 17:05:13 +01:00
parent a17e7470e8
commit 6000fee9fc
2 changed files with 10 additions and 7 deletions
paper-api/src/main/java/org/bukkit

View file

@ -3,7 +3,6 @@ package org.bukkit.fillr;
import org.bukkit.*;
import org.bukkit.plugin.*;
import org.bukkit.plugin.java.*;
import org.bukkit.entity.Player;
import org.bukkit.event.*;
import java.io.File;
@ -31,8 +30,4 @@ public class Fillr extends JavaPlugin {
listener = new FillrListener(getServer());
getServer().getPluginManager().registerEvent(Event.Type.PLAYER_COMMAND, listener, Event.Priority.Normal, this);
}
public void onCommand(Player player, String command, String[] args) {
// TODO Auto-generated method stub
}
}

View file

@ -16,8 +16,16 @@ public class CommandParserYaml {
if (map != null) {
for(Entry<String, Map<String, Object>> entry : map.entrySet()) {
String description = entry.getValue().get("description").toString();
String usageText = entry.getValue().get("usage").toString();
Object d = entry.getValue().get("description");
Object u = entry.getValue().get("usage");
String description = "";
String usageText = "";
if (d != null)
description = d.toString();
if (u != null)
usageText = u.toString();
cmds.add(new Command(entry.getKey(), description, usageText, plugin));
}