Created
December 27, 2016 14:14
-
-
Save phil14052/d8dff5df42bed75f65e8bd275907c367 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.phil14052.ArmedArmorStands; | |
import org.bukkit.Bukkit; | |
import org.bukkit.command.Command; | |
import org.bukkit.command.CommandSender; | |
import org.bukkit.entity.ArmorStand; | |
import org.bukkit.event.EventHandler; | |
import org.bukkit.event.Listener; | |
import org.bukkit.event.entity.CreatureSpawnEvent; | |
import org.bukkit.plugin.PluginDescriptionFile; | |
import org.bukkit.plugin.java.JavaPlugin; | |
public class ArmedArmorStands extends JavaPlugin implements Listener { | |
@Override | |
public void onEnable(){ | |
Bukkit.getServer().getPluginManager().registerEvents(this,this); | |
saveDefaultConfig(); | |
} | |
public boolean onCommand(CommandSender sender, Command cmd, String Label, String[] args){ | |
if(cmd.getName().equalsIgnoreCase("aas")){ | |
PluginDescriptionFile pluginYml = getDescription(); | |
sender.sendMessage(" "); | |
sender.sendMessage("§7§m---------------------------------------"); | |
sender.sendMessage(" "); | |
sender.sendMessage(" §3§l" + pluginYml.getName() + "§7 By §3§l" + pluginYml.getAuthors()); | |
sender.sendMessage(" "); | |
sender.sendMessage(" §7Version: §3§l" + pluginYml.getVersion()); | |
sender.sendMessage(" "); | |
sender.sendMessage("§7§m---------------------------------------"); | |
sender.sendMessage(" "); | |
reloadConfig(); | |
} | |
return false; | |
} | |
@EventHandler | |
public void onCreatureSpawn(CreatureSpawnEvent e){ | |
if(e.isCancelled()){ | |
return; | |
} | |
if (e.getEntity() instanceof ArmorStand) { | |
ArmorStand as = (ArmorStand) e.getEntity(); | |
as.setArms(true); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ArmedArmorStands | |
main: me.phil14052.ArmedArmorStands.ArmedArmorStands | |
version: 1.2.1 | |
author: phil14052 aka PhilPlays | |
description: This plugins add so when you spawn a armor stand it spawns with arms | |
commands: | |
aas: | |
description: ArmedArmorStands Main command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment