[personal profile] fardell24

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 onlinePlayerList = new ArrayList <> ();
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 onlinePlayerList, Player player


・ 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

July 2025

S M T W T F S
   1 2345
67 8 9101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 10th, 2025 01:50 am
Powered by Dreamwidth Studios