ArrayList of sheep to handle sheep that are spawned
This commit is contained in:
parent
afc6ba876e
commit
df7adad359
@ -1,16 +1,22 @@
|
|||||||
package gibstick.bukkit.DiscoSheep;
|
package gibstick.bukkit.DiscoSheep;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.bukkit.entity.Sheep;
|
||||||
|
|
||||||
public final class DiscoSheep extends JavaPlugin {
|
public final class DiscoSheep extends JavaPlugin {
|
||||||
|
|
||||||
|
private ArrayList<Sheep> SheepArray = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable(){
|
public void onEnable(){
|
||||||
getCommand("ds").setExecutor(new DiscoSheepCommandExecutor());
|
getCommand("ds").setExecutor(new DiscoSheepCommandExecutor(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisable(){
|
public void onDisable(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,16 @@ package gibstick.bukkit.DiscoSheep;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.entity.Sheep;
|
|
||||||
|
|
||||||
public class DiscoSheepCommandExecutor implements CommandExecutor {
|
public class DiscoSheepCommandExecutor implements CommandExecutor {
|
||||||
|
|
||||||
|
private DiscoSheep plugin;
|
||||||
|
|
||||||
|
public DiscoSheepCommandExecutor(DiscoSheep plugin) {
|
||||||
|
this.plugin = plugin;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user