diff --git a/.classpath b/.classpath
deleted file mode 100644
index cefbd63..0000000
--- a/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/.gitignore b/.gitignore
index f8a6805..77d9874 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,13 +1,224 @@
-*.class
+#################
+## Eclipse
+#################
-# Mobile Tools for Java (J2ME)
-.mtj.tmp/
+*.pydevproject
+.project
+.metadata/
+bin/
+tmp/
+*.tmp
+*.bak
+*.swp
+*~.nib
+local.properties
+.classpath
+.settings/
+.loadpath
+target/
+.project
-# Package Files #
-*.war
-*.ear
+# External tool builders
+.externalToolBuilders/
-# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
-hs_err_pid*
-/bin/
-/target/
+# Locally stored "Eclipse launch configurations"
+*.launch
+
+# CDT-specific
+.cproject
+
+# PDT-specific
+.buildpath
+
+
+#################
+## Visual Studio
+#################
+
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.sln.docstates
+
+# Build results
+
+[Dd]ebug/
+[Rr]elease/
+x64/
+build/
+[Bb]in/
+[Oo]bj/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+*_i.c
+*_p.c
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.log
+*.scc
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+*.ncrunch*
+.*crunch*.local.xml
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.Publish.xml
+*.pubxml
+*.publishproj
+
+# NuGet Packages Directory
+## TODO: If you have NuGet Package Restore enabled, uncomment the next line
+#packages/
+
+# Windows Azure Build Output
+csx
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Others
+sql/
+*.Cache
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.[Pp]ublish.xml
+*.pfx
+*.publishsettings
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file to a newer
+# Visual Studio version. Backup files are not needed, because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+App_Data/*.mdf
+App_Data/*.ldf
+
+#############
+## Windows detritus
+#############
+
+# Windows image file caches
+Thumbs.db
+ehthumbs.db
+
+# Folder config file
+Desktop.ini
+
+# Recycle Bin used on file shares
+$RECYCLE.BIN/
+
+# Mac crap
+.DS_Store
+
+
+#############
+## Python
+#############
+
+*.py[cod]
+
+# Packages
+*.egg
+*.egg-info
+dist/
+build/
+eggs/
+parts/
+var/
+sdist/
+develop-eggs/
+.installed.cfg
+
+# Installer logs
+pip-log.txt
+
+# Unit test / coverage reports
+.coverage
+.tox
+
+#Translations
+*.mo
+
+#Mr Developer
+.mr.developer.cfg
+.metadata/*
+TheButtonAutoFlair/out/artifacts/Autoflair/Autoflair.jar
+*.iml
+*.name
+.idea/compiler.xml
+*.xml
diff --git a/plugin.yml b/plugin.yml
index 48d67e4..7b9680d 100644
--- a/plugin.yml
+++ b/plugin.yml
@@ -15,3 +15,7 @@ commands:
description: Activates the Flair Me Command. Ask Ali, she was fucking tired when writing this description
gpowercommand:
description: Testing command for ghostie powers
+ powerup:
+ description: Official g-power command that activates the ghostie powerups
+ powerdown:
+ description: Offical g-power command that deactivates the ghostie powerups
\ No newline at end of file
diff --git a/src/alisolarflare/AliPresents.java b/src/alisolarflare/AliPresents.java
index 5a89570..0a34135 100644
--- a/src/alisolarflare/AliPresents.java
+++ b/src/alisolarflare/AliPresents.java
@@ -8,6 +8,8 @@ import alisolarflare.flairdoors.FlairMe;
import alisolarflare.flairdoors.PortalListener;
import alisolarflare.flairdoors.SetFlairDoorColour;
import alisolarflare.gpowers.gPowerCommand;
+import alisolarflare.gpowers.commands.PowerDown;
+import alisolarflare.gpowers.commands.PowerUp;
import alisolarflare.gpowers.listeners.gPowerListener;
//import alisolarflare.links.AliLinkSubPlug;
@@ -39,6 +41,8 @@ public class AliPresents extends JavaPlugin{
//alilinksubplugin.register();
}
public void registerCommands(){
+ getCommand("powerup").setExecutor(new PowerUp());
+ getCommand("powerdown").setExecutor(new PowerDown());
getCommand("gpowercommand").setExecutor(new gPowerCommand());
getCommand("flairme").setExecutor(new FlairMe());
getCommand("alishulker").setExecutor(new AliShulker());
diff --git a/src/alisolarflare/gpowers/commands/PowerDown.java b/src/alisolarflare/gpowers/commands/PowerDown.java
new file mode 100644
index 0000000..e94855e
--- /dev/null
+++ b/src/alisolarflare/gpowers/commands/PowerDown.java
@@ -0,0 +1,15 @@
+package alisolarflare.gpowers.commands;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+
+public class PowerDown implements CommandExecutor {
+
+ @Override
+ public boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+}
diff --git a/src/alisolarflare/gpowers/commands/PowerUp.java b/src/alisolarflare/gpowers/commands/PowerUp.java
new file mode 100644
index 0000000..a172ce3
--- /dev/null
+++ b/src/alisolarflare/gpowers/commands/PowerUp.java
@@ -0,0 +1,20 @@
+package alisolarflare.gpowers.commands;
+
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandExecutor;
+import org.bukkit.command.CommandSender;
+
+import alisolarflare.gpowers.gPowerMemory;
+
+public class PowerUp implements CommandExecutor{
+
+ @Override
+ public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
+ if (!(sender instanceof Player)){
+ sender.sendMessage("You must be a player to use this command!");
+ }
+ gPowerMemory.PowerUpPlayer(player, colour);
+ return false;
+ }
+
+}
diff --git a/src/alisolarflare/gpowers/gPowerMemory.java b/src/alisolarflare/gpowers/gPowerMemory.java
index c121f40..b6c073d 100644
--- a/src/alisolarflare/gpowers/gPowerMemory.java
+++ b/src/alisolarflare/gpowers/gPowerMemory.java
@@ -25,12 +25,21 @@ public class gPowerMemory{
player.sendMessage("POWERRED UP!");
PlayerMap.put(player.getUniqueId(), new poweredPlayer(player.getUniqueId(), colour, true));
}
+ public static void PowerUpPlayer(Player player){
+ //debug("POWERRRED UP");
+ player.sendMessage("POWERRED UP!");
+ if(PlayerMap.containsKey(player.getUniqueId())){
+ PlayerMap.get(player.getUniqueId()).isPowersActive = true;
+ }else{
+ player.sendMessage("You must instantiate your power settings using /gpowercommand");
+ }
+ }
//POWER DEACTIVATION
public static void PowerDownPlayer(Player player){
//debug("POWERRRED DOWN");
if (PlayerMap.containsKey(player.getUniqueId())){
- PlayerMap.get(player.getUniqueId()).playerPowersActivated = false;
+ PlayerMap.get(player.getUniqueId()).isPowersActive = false;
}else{
return;
}
@@ -39,7 +48,7 @@ public class gPowerMemory{
public static void PowerDownPlayer(UUID UniqueID){
//debug("POWEERRED DOWN");
if (PlayerMap.containsKey(UniqueID)){
- PlayerMap.get(UniqueID).playerPowersActivated = false;
+ PlayerMap.get(UniqueID).isPowersActive = false;
}else{
return;
}
@@ -47,7 +56,7 @@ public class gPowerMemory{
public static boolean isPlayerPowered(UUID UniqueID){
//debug("IS PLAYER POWERED?");
if (PlayerMap.containsKey(UniqueID)){
- return PlayerMap.get(UniqueID).playerPowersActivated;
+ return PlayerMap.get(UniqueID).isPowersActive;
}else{
return false;
}
@@ -55,33 +64,37 @@ public class gPowerMemory{
public static boolean isPlayerPowered(Player player){
//debug("IS PLAYER POWERED?");
if (PlayerMap.containsKey(player.getUniqueId())){
- return PlayerMap.get(player.getUniqueId()).playerPowersActivated;
+ return PlayerMap.get(player.getUniqueId()).isPowersActive;
}else{
return false;
}
}
//MEMORY UNIT
public static class poweredPlayer{
- public UUID uuid;
+ public static UUID uuid;
public String colour;
- public Boolean playerPowersActivated;
+ public Boolean isPowersActive;
public poweredPlayer(UUID uuid, String colour, Boolean activated){
this.uuid = (uuid);
this.colour = (colour);
- this.playerPowersActivated = (activated);
+ this.isPowersActive = (activated);
}
public String toString(){
- return "[UUID: "+ uuid.toString() + ", Colour: "+ colour+", IsActivated: "+playerPowersActivated + "]";
+ return "[UUID: "+ uuid.toString() + ", Colour: "+ colour+", IsActivated: "+isPowersActive + "]";
}
}
- /*DEBUG
- @SuppressWarnings({ "deprecation" })
- public static void debug(String debugString){
- if (plugin.getServer().getPlayer("alisolarflare").isOnline() && debugMode == true){
- plugin.getServer().getPlayer("alisolarflare").sendMessage("[gPowerTest]:"+debugString);
+ public void saveMemoryState(){
+ Map PlayerMap = new HashMap();
+ for (UUID uuidKey:PlayerMap.keySet()){
+
+ UUID uuidToSave = poweredPlayer.uuid;
+
}
- }*/
+ }
+ public void loadMemoryState(){
+
+ }
}