Minecraft / clear plugin is not working?

Br
- in Plugins
4

My self programmed Minecraft / clear plugin does not work can anyone help me here src:

package de.ifreeaple.ifreeessentials.commands;

import org.bukkit.Bukkit;

import org.bukkit.command.Command;

import org.bukkit.command.CommandExecutor;

import org.bukkit.command.CommandSender;

import org.bukkit.entity.Player;

import de.ifreeaple.ifreeessentials.main.Main;

public class ClearCommand implements CommandExecutor {

@Override

public boolean onCommand (CommandSender sender, Command cmd, String label, String [] args) {

if (! Sender instanceof Player)) {

sender.sendMessage (Main.cfg.getString ( "noplayer"));

return true;

}

Player p = (player) transmitter;

if (! P.hasPermission ( "clear")) {

p.sendMessage (Main.cfg.getString ("noperm"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

return true;

}

if (args.length == 0) {

p.getInventory () clear ().

p.sendMessage (Main.cfg.getString ("clear"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

} else if (args.length == 1) {

if (! P.hasPermission ( "clear.other")) {

p.sendMessage (Main.cfg.getString ("clearo"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

return true;

}

Player target = Bukkit.getPlayer (args [0]);

if (target == null) {

p.sendMessage (Main.cfg.getString ("playernf"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

return true;

}

p.getInventory () clear ().

target.sendMessage (Main.cfg.getString ("clear"). ReplaceAll ("&", "§").) replaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

p.sendMessage (Main.cfg.getString ("clearo"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

} else {

p.sendMessage (Main.cfg.getString ("syntaxclear"). ReplaceAll ("&", "§"). ReplaceAll ("% prefix%", Main.cfg.getString ("prefix"). ReplaceAll ("&", "§";

}

return false;

Ka

What does "it does not work" mean? Will not it load? Does the command not work? Does he work differently than he should? Is there an error message in the console?

Ka

A little tip: Make your own method for replacing & and so on, or better still, your own player class. This will save you a lot of writing and more, if you need to add or change something.

Br

No, nothing happens

Ka

Do you have any other plugin on the server whose main class is called Main?