Updateee???
This commit is contained in:
parent
03e431e085
commit
f08413f642
4 changed files with 20 additions and 14 deletions
BIN
AliPresents.jar
BIN
AliPresents.jar
Binary file not shown.
|
@ -9,7 +9,7 @@ commands:
|
|||
description: Presses an Ali Link pressalilink frequency
|
||||
setalilink:
|
||||
description: Creates an Ali Link setalilink frequency
|
||||
setFlairDoorColour:
|
||||
setflairdoorcolour:
|
||||
description: Sets the flair door colour mode, when lighting portals
|
||||
flairme:
|
||||
description: Activates the Flair Me Command. Ask Ali, she was fucking tired when writing this description
|
|
@ -34,13 +34,13 @@ public class AliPresents extends JavaPlugin{
|
|||
|
||||
}
|
||||
public void registerSubPlugins(){
|
||||
AliLinkSubPlug alilinksubplugin = new AliLinkSubPlug(this);
|
||||
alilinksubplugin.register();
|
||||
//AliLinkSubPlug alilinksubplugin = new AliLinkSubPlug(this);
|
||||
//alilinksubplugin.register();
|
||||
}
|
||||
public void registerCommands(){
|
||||
getCommand("FlairMe").setExecutor(new FlairMe());
|
||||
getCommand("flairme").setExecutor(new FlairMe());
|
||||
getCommand("alishulker").setExecutor(new AliShulker());
|
||||
getCommand("SetFlairDoorColour").setExecutor(new SetFlairDoorColour());
|
||||
getCommand("setflairdoorcolour").setExecutor(new SetFlairDoorColour());
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,8 @@ import org.bukkit.block.Block;
|
|||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.entity.EntityPortalEvent;
|
||||
import org.bukkit.event.player.PlayerPortalEvent;
|
||||
import org.bukkit.material.MaterialData;
|
||||
import org.bukkit.material.Wool;
|
||||
|
||||
import alisolarflare.AliPresents;
|
||||
|
@ -29,22 +30,23 @@ public class PortalListener implements Listener{
|
|||
this.plugin = plugin;
|
||||
}
|
||||
@EventHandler
|
||||
public void onPortalEnter(EntityPortalEvent event){
|
||||
public void onPortalEnter(PlayerPortalEvent event){
|
||||
//SANITATION - Player
|
||||
if(!(event.getEntity() instanceof Player)){
|
||||
if(!(event.getPlayer() instanceof Player)){
|
||||
return;
|
||||
}
|
||||
|
||||
//INIT - Player
|
||||
Player player = (Player) event.getEntity();
|
||||
Player player = event.getPlayer();
|
||||
player.sendMessage("MAY THE FLAIRING COMMENCE");
|
||||
|
||||
//SANITATION - PlayersToBeFlaired
|
||||
if(!(playersToBeFlaired.contains(player.getName()))){
|
||||
return;
|
||||
}
|
||||
player.sendMessage("MAY THE FLAIRING COMMENCE");
|
||||
player.sendMessage("-MAY THE FLAIRING COMMENCE-");
|
||||
player.sendMessage("Deactivating regular portal behaviour...");
|
||||
event.setCancelled(true);
|
||||
event.setTo(player.getLocation());
|
||||
|
||||
//INIT - x,y,z
|
||||
int x = player.getLocation().getBlockX();
|
||||
|
@ -69,20 +71,24 @@ public class PortalListener implements Listener{
|
|||
//TOP BLOCK IS WOOL?
|
||||
}else if(blockTopper.getType() == Material.WOOL){
|
||||
player.sendMessage("WOOL DETECTED T");
|
||||
Wool wool = (Wool) blockTopper;
|
||||
Wool wool = (Wool) blockTopper.getState().getData();
|
||||
recolourPlayer(player, wool.getColor());
|
||||
|
||||
//MIDDLE BLOCK IS WOOL?
|
||||
}else if(blockMiddle.getType() == Material.WOOL){
|
||||
|
||||
player.sendMessage("WOOL DETECTED M");
|
||||
Wool wool = (Wool) blockMiddle;
|
||||
MaterialData mData = blockMiddle.getState().getData();
|
||||
player.sendMessage("MATERIAL DATA COLLECTED: "+ mData.toString());
|
||||
Wool wool = (Wool) mData;
|
||||
player.sendMessage("WOOL DATA CONVERTED: "+ wool.toString());
|
||||
|
||||
recolourPlayer(player, wool.getColor());
|
||||
|
||||
//BOTTOM BLOCK IS WOOL?
|
||||
}else if (blockBottom.getType() == Material.WOOL){
|
||||
player.sendMessage("WOOL DETECTED B");
|
||||
Wool wool = (Wool) blockBottom;
|
||||
Wool wool = (Wool) blockBottom.getState().getData();
|
||||
recolourPlayer(player, wool.getColor());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue