ArrayList of sheep to handle sheep that are spawned

This commit is contained in:
Charlie Wang 2013-06-30 11:44:26 -04:00
parent afc6ba876e
commit df7adad359
2 changed files with 15 additions and 3 deletions

View File

@ -1,16 +1,22 @@
package gibstick.bukkit.DiscoSheep;
import java.util.ArrayList;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.entity.Sheep;
public final class DiscoSheep extends JavaPlugin {
private ArrayList<Sheep> SheepArray = new ArrayList<>();
@Override
public void onEnable(){
getCommand("ds").setExecutor(new DiscoSheepCommandExecutor());
getCommand("ds").setExecutor(new DiscoSheepCommandExecutor(this));
}
@Override
public void onDisable(){
}
}

View File

@ -3,10 +3,16 @@ package gibstick.bukkit.DiscoSheep;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.command.CommandExecutor;
import org.bukkit.entity.Sheep;
public class DiscoSheepCommandExecutor implements CommandExecutor {
private DiscoSheep plugin;
public DiscoSheepCommandExecutor(DiscoSheep plugin) {
this.plugin = plugin;
}
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {