Moved player data and plugin updater (#5) from the chat plugin #6

Merged
NorbiPeti merged 18 commits from Norbi into master 2016-08-30 22:29:18 +00:00
13 changed files with 27 additions and 21 deletions
Showing only changes of commit 8caeab1aa5 - Show all commits

View file

@ -1,4 +1,4 @@
package buttondevteam;
package buttondevteam.bucket;
import java.util.logging.Logger;
@ -6,8 +6,8 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginDescriptionFile;
import org.bukkit.plugin.java.JavaPlugin;
import buttondevteam.alisolarflare.aliarrow.AliArrowSubPlugin;
import buttondevteam.core.CoreSubPlugin;
import buttondevteam.bucket.alisolarflare.aliarrow.AliArrowSubPlugin;
import buttondevteam.bucket.core.CoreSubPlugin;
public class MainPlugin extends JavaPlugin {
public static MainPlugin Instance;

View file

@ -1,4 +1,4 @@
package buttondevteam.alisolarflare.aliarrow;
package buttondevteam.bucket.alisolarflare.aliarrow;
import org.bukkit.entity.Arrow;
import org.bukkit.entity.EntityType;
@ -6,7 +6,8 @@ import org.bukkit.entity.Projectile;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import buttondevteam.MainPlugin;
import buttondevteam.bucket.MainPlugin;
public class AliArrowListener implements Listener {
private final MainPlugin plugin;

View file

@ -1,8 +1,8 @@
package buttondevteam.alisolarflare.aliarrow;
package buttondevteam.bucket.alisolarflare.aliarrow;
import java.util.logging.Level;
import buttondevteam.MainPlugin;
import buttondevteam.bucket.MainPlugin;
public class AliArrowSubPlugin {
private MainPlugin plugin;

View file

@ -1,10 +1,10 @@
package buttondevteam.alisolarflare.aliarrow;
package buttondevteam.bucket.alisolarflare.aliarrow;
import org.bukkit.Particle;
import org.bukkit.entity.Arrow;
import org.bukkit.scheduler.BukkitRunnable;
import buttondevteam.MainPlugin;
import buttondevteam.bucket.MainPlugin;
public class AliArrowTask extends BukkitRunnable{
MainPlugin plugin;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import java.util.logging.Level;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
@ -10,12 +10,17 @@ public class PlayerListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST)
public void OnPlayerJoin(PlayerJoinEvent event) {
if (TBMCPlayer.LoadPlayer(event.getPlayer()) == null)
TBMCPlayer player = TBMCPlayer.LoadPlayer(event.getPlayer());
if (player == null)
event.getPlayer().sendMessage("§c[TBMC] Failed to load player data! Please contact a mod.");
else
TBMCPlayer.JoinPlayer(player);
}
@EventHandler(priority = EventPriority.HIGHEST)
public void OnPlayerLeave(PlayerQuitEvent event) {
TBMCPlayer.SavePlayer(TBMCPlayer.GetPlayer(event.getPlayer()));
TBMCPlayer player = TBMCPlayer.GetPlayer(event.getPlayer());
TBMCPlayer.SavePlayer(player);
TBMCPlayer.QuitPlayer(player);
}
}

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import java.io.File;
import java.io.IOException;
@ -14,7 +14,7 @@ import org.apache.commons.io.IOUtils;
import org.json.JSONArray;
import org.json.JSONObject;
import buttondevteam.MainPlugin;
import buttondevteam.bucket.MainPlugin;
public final class TBMCCoreAPI {
/**

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import java.io.File;
import java.io.IOException;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.Event;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

View file

@ -1,4 +1,4 @@
package buttondevteam.core;
package buttondevteam.bucket.core;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.event.Event;