![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Digital and Interactive Games 2015, Term 3, Session 6
Today: - Player (inventory, item-in-hand)
・ Extending the timer to give player effects
・ Create a new project based on the timer and name it “PlayerTutorial”
・ Leave the run() empty
・ Update plugin.yml to have a command called “test”
if (option.length == 0) return false;
Player player = (Player) sender;
List
for (Player p : Bukkit.getonlinePlayers)) {
onlinePlayerList.add(p);
}
if (option[0].equalsIgnoreCase(“list”)) {
for (Player p : onlinePlayerList) {
Player.sendMessage(p.getName());
}
}
World w = p.getWorld();
w.spawnEntity(p.getLocation(), EntityType.CHICKEN);
continue
if (p.getName().EqualsIgnoreCase(player.getName())) continue;
w.spawnEntity(p.getLocation().getBlock().getRelative(bf1, - 5).getLocation, EntityType.PIG_ZOMBIE);
・ Get Online Players
・ Continue
・ How to use option (onCommand)
・ Set GameMode ()
List
・ Spawn a mob behind the player (Except you)
・ Say hi to the player
・ Split the “mob” into its own private function
p.getInventory(p.setItemInHand(new ItemStack(Material.DIAMOND_SWORD));
arm option to give players the equipment they need
Game
|
|
\/
PluginTutorial
|
|
\/
TestCommand
public void updateHealth()
double h = p.getHealth();
p.setHealth (h + 0.1);
boolean setHealth
int mobSpawnTime