Digital
and Interactive Games 2015 – Term 3, Session 2
Today:
・ Create your first plugin
・ Create a plugin with one simple command
Link file
spigot-1.8.7.jar
Totally open source
Plugin Tutorial
plugin.yml
<a href="http://s483.photobucket.com/user/Brenorenz/media/W18001_zpsrmufgdhm.png.html" target="_blank"><img src="http://i483.photobucket.com/albums/rr193/Brenorenz/W18001_zpsrmufgdhm.png" border="0" alt=" photo W18001_zpsrmufgdhm.png"/></a>
http://i483.photobucket.com/albums/rr193/Brenorenz/W18001_zpsrmufgdhm.png
public final class pluginTutorial extends JavaPlugin
import org.bukkitt.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;
Bukkit.broadcastmessage(“PluginTutorial”);
Command Tutorial
My Command
getCommand(“myCommand”).setExecuter(new myCommandCommand());
Minecraft
|
onEnable() → main Plugin reference sent
|
Link new command
. Command
. Class
. . on Command() reference received
・ method
・ method
if (!sender instanceOf Player) {
run();
} else {
Player player = (Player) sender;
player.sendMessage(“You type my command”);
}
return true;
Player
・ location
・ inventory
Next week manipulating blocks
Week 3 manipulating timing
Create a plugin based on your .yml
Search Bukkit for similar plugins
・ read the docs
・ what needs to be improved
#gamedesign #gameprogramming #java #minecraft #programming #yaml
Today:
・ Create your first plugin
・ Create a plugin with one simple command
Link file
spigot-1.8.7.jar
Totally open source
Plugin Tutorial
plugin.yml
<a href="http://s483.photobucket.com/user/Brenorenz/media/W18001_zpsrmufgdhm.png.html" target="_blank"><img src="http://i483.photobucket.com/albums/rr193/Brenorenz/W18001_zpsrmufgdhm.png" border="0" alt=" photo W18001_zpsrmufgdhm.png"/></a>
http://i483.photobucket.com/albums/rr193/Brenorenz/W18001_zpsrmufgdhm.png
public final class pluginTutorial extends JavaPlugin
import org.bukkitt.plugin.java.JavaPlugin;
import org.bukkit.Bukkit;
Bukkit.broadcastmessage(“PluginTutorial”);
Command Tutorial
My Command
getCommand(“myCommand”).setExecuter(new myCommandCommand());
Minecraft
|
onEnable() → main Plugin reference sent
|
Link new command
. Command
. Class
. . on Command() reference received
・ method
・ method
if (!sender instanceOf Player) {
run();
} else {
Player player = (Player) sender;
player.sendMessage(“You type my command”);
}
return true;
Player
・ location
・ inventory
Next week manipulating blocks
Week 3 manipulating timing
Create a plugin based on your .yml
Search Bukkit for similar plugins
・ read the docs
・ what needs to be improved
#gamedesign #gameprogramming #java #minecraft #programming #yaml
No comments:
Post a Comment