mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Because lowercase class names are evil.
This commit is contained in:
@ -17,7 +17,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
@ -315,7 +315,7 @@ public class Combat {
|
||||
private static void dealDamage(LivingEntity target, int dmg, DamageCause cause) {
|
||||
if (configInstance.getEventCallbackEnabled()) {
|
||||
EntityDamageEvent ede = new FakeEntityDamageEvent(target, cause, dmg);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(ede);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(ede);
|
||||
|
||||
if (ede.isCancelled()) {
|
||||
return;
|
||||
@ -338,7 +338,7 @@ public class Combat {
|
||||
private static void dealDamage(LivingEntity target, int dmg, Player attacker) {
|
||||
if (configInstance.getEventCallbackEnabled()) {
|
||||
EntityDamageEvent ede = new FakeEntityDamageByEntityEvent(attacker, target, EntityDamageEvent.DamageCause.ENTITY_ATTACK, dmg);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(ede);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(ede);
|
||||
|
||||
if (ede.isCancelled()) {
|
||||
return;
|
||||
@ -383,7 +383,7 @@ public class Combat {
|
||||
}
|
||||
|
||||
PlayerAnimationEvent armswing = new PlayerAnimationEvent(attacker);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
|
||||
if (entity instanceof Player) {
|
||||
Player defender = (Player) entity;
|
||||
@ -541,7 +541,7 @@ public class Combat {
|
||||
}
|
||||
|
||||
if (baseXP != 0) {
|
||||
mcMMO.p.getServer().getScheduler().scheduleSyncDelayedTask(mcMMO.p, new GainXp(attacker, PP, skillType, baseXP, target), 0);
|
||||
McMMO.p.getServer().getScheduler().scheduleSyncDelayedTask(McMMO.p, new GainXp(attacker, PP, skillType, baseXP, target), 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.DatabaseUpdate;
|
||||
import com.gmail.nossr50.runnables.SQLReconnect;
|
||||
@ -19,10 +19,10 @@ public class Database {
|
||||
private static String connectionString = "jdbc:mysql://" + Config.getInstance().getMySQLServerName() + ":" + Config.getInstance().getMySQLServerPort() + "/" + Config.getInstance().getMySQLDatabaseName() + "?user=" + Config.getInstance().getMySQLUserName() + "&password=" + Config.getInstance().getMySQLUserPassword();
|
||||
private static String tablePrefix = Config.getInstance().getMySQLTablePrefix();
|
||||
private static Connection conn = null;
|
||||
private static mcMMO plugin = null;
|
||||
private static McMMO plugin = null;
|
||||
private static long reconnectTimestamp = 0;
|
||||
|
||||
public Database(mcMMO instance) {
|
||||
public Database(McMMO instance) {
|
||||
plugin = instance;
|
||||
connect(); //Connect to MySQL
|
||||
|
||||
|
@ -2,7 +2,7 @@ package com.gmail.nossr50.util;
|
||||
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.api.SpoutToolsAPI;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.mods.CustomArmorConfig;
|
||||
@ -32,7 +32,7 @@ public class ItemChecks {
|
||||
if (customToolsEnabled && CustomToolsConfig.getInstance().customSwordIDs.contains(is.getTypeId())) {
|
||||
return true;
|
||||
}
|
||||
else if (mcMMO.spoutEnabled && SpoutToolsAPI.spoutSwords.contains(is)) {
|
||||
else if (McMMO.spoutEnabled && SpoutToolsAPI.spoutSwords.contains(is)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -60,7 +60,7 @@ public class ItemChecks {
|
||||
if (customToolsEnabled && CustomToolsConfig.getInstance().customHoeIDs.contains(is.getTypeId())) {
|
||||
return true;
|
||||
}
|
||||
else if (mcMMO.spoutEnabled && SpoutToolsAPI.spoutHoes.contains(is)) {
|
||||
else if (McMMO.spoutEnabled && SpoutToolsAPI.spoutHoes.contains(is)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -88,7 +88,7 @@ public class ItemChecks {
|
||||
if (customToolsEnabled && CustomToolsConfig.getInstance().customShovelIDs.contains(is.getTypeId())) {
|
||||
return true;
|
||||
}
|
||||
else if (mcMMO.spoutEnabled && SpoutToolsAPI.spoutShovels.contains(is)) {
|
||||
else if (McMMO.spoutEnabled && SpoutToolsAPI.spoutShovels.contains(is)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -116,7 +116,7 @@ public class ItemChecks {
|
||||
if (customToolsEnabled && CustomToolsConfig.getInstance().customAxeIDs.contains(is.getTypeId())) {
|
||||
return true;
|
||||
}
|
||||
else if (mcMMO.spoutEnabled && SpoutToolsAPI.spoutAxes.contains(is)) {
|
||||
else if (McMMO.spoutEnabled && SpoutToolsAPI.spoutAxes.contains(is)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -144,7 +144,7 @@ public class ItemChecks {
|
||||
if (customToolsEnabled && CustomToolsConfig.getInstance().customPickaxeIDs.contains(is.getTypeId())) {
|
||||
return true;
|
||||
}
|
||||
else if (mcMMO.spoutEnabled && SpoutToolsAPI.spoutPickaxes.contains(is)) {
|
||||
else if (McMMO.spoutEnabled && SpoutToolsAPI.spoutPickaxes.contains(is)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
@ -7,16 +7,16 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerStat;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.datatypes.Tree;
|
||||
|
||||
public class Leaderboard {
|
||||
private static mcMMO plugin = mcMMO.p;
|
||||
private static String leaderboardsDirectory = mcMMO.leaderboardDirectory;
|
||||
private final static String location = mcMMO.usersFile;
|
||||
private static McMMO plugin = McMMO.p;
|
||||
private static String leaderboardsDirectory = McMMO.leaderboardDirectory;
|
||||
private final static String location = McMMO.usersFile;
|
||||
|
||||
/**
|
||||
* Create the leaderboards.
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.plugin.PluginManager;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
|
||||
import com.gmail.nossr50.events.fake.FakeBlockDamageEvent;
|
||||
@ -110,10 +110,10 @@ public class Misc {
|
||||
//Support for NoCheat
|
||||
if (shouldArmSwing) {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
}
|
||||
|
||||
PluginManager pluginManger = mcMMO.p.getServer().getPluginManager();
|
||||
PluginManager pluginManger = McMMO.p.getServer().getPluginManager();
|
||||
|
||||
FakeBlockDamageEvent damageEvent = new FakeBlockDamageEvent(player, block, player.getItemInHand(), true);
|
||||
pluginManger.callEvent(damageEvent);
|
||||
@ -247,7 +247,7 @@ public class Misc {
|
||||
|
||||
// We can't get the item until we spawn it and we want to make it cancellable, so we have a custom event.
|
||||
McMMOItemSpawnEvent event = new McMMOItemSpawnEvent(location, itemStack);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
|
@ -10,7 +10,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.SpoutConfig;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
@ -194,7 +194,7 @@ public class Skills {
|
||||
profile.skillUp(skillType, 1);
|
||||
|
||||
McMMOPlayerLevelUpEvent eventToFire = new McMMOPlayerLevelUpEvent(player, skillType);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(eventToFire);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(eventToFire);
|
||||
}
|
||||
else {
|
||||
profile.addLevels(skillType, 0);
|
||||
@ -209,7 +209,7 @@ public class Skills {
|
||||
String capitalized = Misc.getCapitalized(skillType.toString());
|
||||
|
||||
/* Spout Stuff */
|
||||
if (mcMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
if (McMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
|
||||
|
||||
if (sPlayer.isSpoutCraftEnabled()) {
|
||||
@ -234,7 +234,7 @@ public class Skills {
|
||||
}
|
||||
|
||||
/* Always update XP Bar (Check if no levels were gained first to remove redundancy) */
|
||||
if (skillups == 0 && mcMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
if (skillups == 0 && McMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
SpoutPlayer sPlayer = (SpoutPlayer) player;
|
||||
if (sPlayer.isSpoutCraftEnabled()) {
|
||||
if (SpoutConfig.getInstance().getXPBarEnabled()) {
|
||||
|
@ -8,7 +8,7 @@ import java.util.HashMap;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
|
||||
public class Users {
|
||||
@ -18,10 +18,10 @@ public class Users {
|
||||
* Load users.
|
||||
*/
|
||||
public static void loadUsers() {
|
||||
new File(mcMMO.flatFileDirectory).mkdir();
|
||||
new File(mcMMO.leaderboardDirectory).mkdir();
|
||||
new File(McMMO.flatFileDirectory).mkdir();
|
||||
new File(McMMO.leaderboardDirectory).mkdir();
|
||||
|
||||
File theDir = new File(mcMMO.usersFile);
|
||||
File theDir = new File(McMMO.usersFile);
|
||||
|
||||
if (!theDir.exists()) {
|
||||
try {
|
||||
@ -79,7 +79,7 @@ public class Users {
|
||||
* @param playerName The name of the player to remove
|
||||
*/
|
||||
public static void removeUserByName(String playerName) {
|
||||
players.remove(mcMMO.p.getServer().getOfflinePlayer(playerName));
|
||||
players.remove(McMMO.p.getServer().getOfflinePlayer(playerName));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,7 +99,7 @@ public class Users {
|
||||
* @return the player's profile
|
||||
*/
|
||||
public static PlayerProfile getProfileByName(String playerName) {
|
||||
Player player = mcMMO.p.getServer().getPlayer(playerName);
|
||||
Player player = McMMO.p.getServer().getPlayer(playerName);
|
||||
PlayerProfile profile = players.get(player);
|
||||
|
||||
if (profile == null) {
|
||||
@ -110,7 +110,7 @@ public class Users {
|
||||
return newProfile;
|
||||
}
|
||||
else {
|
||||
mcMMO.p.getLogger().severe("getProfileByName(" + playerName + ") just returned null :(");
|
||||
McMMO.p.getLogger().severe("getProfileByName(" + playerName + ") just returned null :(");
|
||||
|
||||
for (StackTraceElement ste : new Throwable().getStackTrace()) {
|
||||
System.out.println(ste);
|
||||
|
@ -13,7 +13,7 @@ import org.bukkit.Bukkit;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.McMMO;
|
||||
|
||||
public class HashChunkletManager implements ChunkletManager {
|
||||
private HashMap<String, ChunkletStore> store = new HashMap<String, ChunkletStore>();
|
||||
@ -229,7 +229,7 @@ public class HashChunkletManager implements ChunkletManager {
|
||||
} catch (IOException ex) {
|
||||
if (ex instanceof EOFException) {
|
||||
// EOF should only happen on Chunklets that somehow have been corrupted.
|
||||
mcMMO.p.getLogger().severe("Chunklet data at " + location.toString() + " could not be read, data in this are will be lost.");
|
||||
McMMO.p.getLogger().severe("Chunklet data at " + location.toString() + " could not be read, data in this are will be lost.");
|
||||
return ChunkletStoreFactory.getChunkletStore();
|
||||
}
|
||||
ex.printStackTrace();
|
||||
|
Reference in New Issue
Block a user