Merge branch 'pregametutorial' of http://184.154.0.242:7990/scm/min/mineplex into type-wars

This commit is contained in:
Sarah 2015-11-20 19:04:51 +01:00
commit 6f7d49b71b
6 changed files with 75 additions and 79 deletions

View File

@ -38,9 +38,8 @@ public class PlayerTracker implements Listener, Runnable
_plugin.getProxy().getPluginManager().registerListener(_plugin, this); _plugin.getProxy().getPluginManager().registerListener(_plugin, this);
_plugin.getProxy().getScheduler().schedule(_plugin, this, 1L, 1L, TimeUnit.MINUTES); _plugin.getProxy().getScheduler().schedule(_plugin, this, 1L, 1L, TimeUnit.MINUTES);
Region region = !new File("eu.dat").exists() ? Region.US : Region.EU;
_repository = new RedisDataRepository<PlayerStatus>(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(), _repository = new RedisDataRepository<PlayerStatus>(ServerManager.getMasterConnection(), ServerManager.getSlaveConnection(),
region, PlayerStatus.class, "playerStatus"); Region.currentRegion(), PlayerStatus.class, "playerStatus");
ServerCommandManager.getInstance().registerCommandType("PlayerJoinCommand", mineplex.serverdata.commands.PlayerJoinCommand.class, new PlayerJoinHandler(this)); ServerCommandManager.getInstance().registerCommandType("PlayerJoinCommand", mineplex.serverdata.commands.PlayerJoinCommand.class, new PlayerJoinHandler(this));

View File

@ -28,13 +28,6 @@ public class UpdateRank extends CommandBase<CoreClientManager>
@Override @Override
public void Execute(final Player caller, String[] args) public void Execute(final Player caller, String[] args)
{ {
if (!Plugin.Get(caller).GetRank(true).has(caller, Rank.ADMIN, true))
{
return;
}
boolean testServer = Plugin.getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing");
if (args == null) if (args == null)
{ {
UtilPlayer.message(caller, F.main(Plugin.getName(), "/" + AliasUsed + " joeschmo MODERATOR")); UtilPlayer.message(caller, F.main(Plugin.getName(), "/" + AliasUsed + " joeschmo MODERATOR"));
@ -62,14 +55,6 @@ public class UpdateRank extends CommandBase<CoreClientManager>
final Rank rank = tempRank; final Rank rank = tempRank;
if (rank == Rank.ADMIN || rank == Rank.YOUTUBE || rank == Rank.TWITCH || rank == Rank.MODERATOR || rank == Rank.JNR_DEV || rank == Rank.HELPER || rank == Rank.ALL || rank == Rank.MAPDEV || rank == Rank.SNR_MODERATOR || rank == Rank.SUPPORT)
{
if (!testServer && rank.has(Rank.ADMIN) && !Plugin.hasRank(caller, Rank.LT))
{
UtilPlayer.message(caller, F.main(Plugin.getName(), ChatColor.RED + "" + ChatColor.BOLD + "Insufficient privileges!"));
return;
}
Plugin.getRepository().matchPlayerName(new Callback<List<String>>() Plugin.getRepository().matchPlayerName(new Callback<List<String>>()
{ {
public void run(List<String> matches) public void run(List<String> matches)
@ -136,5 +121,4 @@ public class UpdateRank extends CommandBase<CoreClientManager>
}, playerName); }, playerName);
} }
} }
}
} }

View File

@ -74,6 +74,8 @@ public abstract class Gadget extends SalesPackageBase implements Listener
return; return;
} }
System.out.println(player.getName() + " has activated " + Name);
EnableCustom(player); EnableCustom(player);
Manager.setActive(player, this); Manager.setActive(player, this);
} }

View File

@ -269,6 +269,13 @@ public class ProjectileUser
nmsEntity.locY -= nmsEntity.motY / f2 * 0.0500000007450581D; nmsEntity.locY -= nmsEntity.motY / f2 * 0.0500000007450581D;
nmsEntity.locZ -= nmsEntity.motZ / f2 * 0.0500000007450581D; nmsEntity.locZ -= nmsEntity.motZ / f2 * 0.0500000007450581D;
if (nmsEntity.locX == Double.NaN)
System.out.println(_thrown + " has made " + nmsEntity + "'s locX NaN.");
if (nmsEntity.locY == Double.NaN)
System.out.println(_thrown + " has made " + nmsEntity + "'s locY NaN.");
if (nmsEntity.locZ == Double.NaN)
System.out.println(_thrown + " has made " + nmsEntity + "'s locZ NaN.");
_callback.Collide(null, block, this); _callback.Collide(null, block, this);
return true; return true;
} }

View File

@ -149,7 +149,7 @@ public class Hub extends JavaPlugin implements IRelation
return true; return true;
} }
}); });
new GlobalPacketManager(this, clientManager, serverStatusManager); new GlobalPacketManager(this, clientManager, serverStatusManager, inventoryManager, donationManager, petManager, statsManager, giveawayManager);
//new Replay(this, packetHandler); //new Replay(this, packetHandler);
AprilFoolsManager.Initialize(this, clientManager, disguiseManager); AprilFoolsManager.Initialize(this, clientManager, disguiseManager);

View File

@ -224,6 +224,8 @@ public class StackerManager extends MiniPlugin implements IThrown
UtilPlayer.message(thrower, F.main("Stacker", "You threw " + F.name(UtilEnt.getName(throwee)))); UtilPlayer.message(thrower, F.main("Stacker", "You threw " + F.name(UtilEnt.getName(throwee))));
UtilPlayer.message(throwee, F.main("Stacker", "You were thrown by " + F.name(thrower.getName()))); UtilPlayer.message(throwee, F.main("Stacker", "You were thrown by " + F.name(thrower.getName())));
System.out.println("Stacker throw.");
UtilAction.velocity(throwee, thrower.getLocation().getDirection(), 1.8, false, 0, 0.3, 2, false); UtilAction.velocity(throwee, thrower.getLocation().getDirection(), 1.8, false, 0, 0.3, 2, false);
_projectileManager.AddThrow(throwee, thrower, this, 4000, true, false, true, false, 0.5f); _projectileManager.AddThrow(throwee, thrower, this, 4000, true, false, true, false, 0.5f);
@ -245,6 +247,8 @@ public class StackerManager extends MiniPlugin implements IThrown
if (!Manager.hasPlayerStackingEnabled(target)) if (!Manager.hasPlayerStackingEnabled(target))
return; return;
System.out.println("Stacker collide.");
//Velocity //Velocity
UtilAction.velocity(target, UtilAlg.getTrajectory2d(data.GetThrown(), target), 1, true, 0.8, 0, 10, true); UtilAction.velocity(target, UtilAlg.getTrajectory2d(data.GetThrown(), target), 1, true, 0.8, 0, 10, true);