Attempting merge fix
This commit is contained in:
commit
9fc9e01c3b
@ -1,6 +1,7 @@
|
||||
package gibstick.bukkit.DiscoSheep;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.lang.Math;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.entity.Sheep;
|
||||
import org.bukkit.Location;
|
||||
@ -33,9 +34,19 @@ public final class DiscoSheep extends JavaPlugin {
|
||||
// Spawn some number of sheep next to given player
|
||||
public void spawnSheep(Player player, int num) {
|
||||
Location loc;
|
||||
World world = player.getWorld();
|
||||
|
||||
for (int i = 0; i < num; i++) {
|
||||
double x, y, z;
|
||||
|
||||
// random x and z coordinates within a 5 block radius
|
||||
// safe y-coordinate
|
||||
x = -5 + (Math.random() * ((5 - (-5)) + 1)) + player.getLocation().getX();
|
||||
z = -5 + (Math.random() * ((5 - (-5)) + 1)) + player.getLocation().getZ();
|
||||
y = world.getHighestBlockYAt((int) x, (int) z);
|
||||
loc = new Location(world, x, y, z);
|
||||
|
||||
spawnSheep(world, loc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,35 +64,4 @@ public final class DiscoSheep extends JavaPlugin {
|
||||
//sheepArray.get(i) something something
|
||||
}
|
||||
}
|
||||
|
||||
public void playSounds(){
|
||||
// TODO: generate list of players to send sounds to
|
||||
}
|
||||
|
||||
public void playSounds(Player player){
|
||||
//TODO: Add sound playing here
|
||||
}
|
||||
|
||||
/*
|
||||
Called after discosheep is stopped
|
||||
*/
|
||||
public void cleanUp(){
|
||||
removeAllSheep();
|
||||
}
|
||||
|
||||
void scheduleUpdate(){
|
||||
updater.runTaskLater(updater,frequency);
|
||||
}
|
||||
|
||||
public void startDisco(int frequency, int duration){
|
||||
updater.start(frequency, duration);
|
||||
}
|
||||
|
||||
public void startDisco(){
|
||||
this.startDisco();
|
||||
}
|
||||
|
||||
public void stopDisco(){
|
||||
updater.stop();
|
||||
}
|
||||
}
|
||||
|
@ -33,3 +33,35 @@ public class DiscoUpdater extends BukkitRunnable{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
public void playSounds(){
|
||||
// TODO: generate list of players to send sounds to
|
||||
}
|
||||
|
||||
public void playSounds(Player player){
|
||||
//TODO: Add sound playing here
|
||||
}
|
||||
|
||||
// Called after discosheep is stopped
|
||||
public void cleanUp(){
|
||||
removeAllSheep();
|
||||
}
|
||||
|
||||
void scheduleUpdate(){
|
||||
updater.runTaskLater(updater,frequency);
|
||||
}
|
||||
|
||||
public void startDisco(int frequency, int duration){
|
||||
updater.start(frequency, duration);
|
||||
}
|
||||
|
||||
public void startDisco(){
|
||||
this.startDisco();
|
||||
}
|
||||
|
||||
public void stopDisco(){
|
||||
updater.stop();
|
||||
}
|
||||
*/
|
Loading…
Reference in New Issue
Block a user