Removed class files from source control.
This commit is contained in:
parent
c9dd8d87eb
commit
1b7b549647
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,90 +0,0 @@
|
|||||||
package me.chiss.Core.ClientData;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
|
|
||||||
import mineplex.core.account.CoreClient;
|
|
||||||
|
|
||||||
public class ClientPlayer extends ClientDataBase<Object>
|
|
||||||
{
|
|
||||||
private long _lastAction = 0;
|
|
||||||
private long _lastGrounded = 0;
|
|
||||||
private long _lastMovement = 0;
|
|
||||||
private long _lastDamagee = 0;
|
|
||||||
private long _lastDamager = 0;
|
|
||||||
|
|
||||||
private Location _lastLocation = null;
|
|
||||||
|
|
||||||
public ClientPlayer(CoreClient client)
|
|
||||||
{
|
|
||||||
super(client, "Player", null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void Load()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void LoadToken(Object token)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastAction() {
|
|
||||||
return _lastAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastAction(long _lastAction) {
|
|
||||||
this._lastAction = _lastAction;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastGrounded() {
|
|
||||||
return _lastGrounded;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastGrounded(long _lastGrounded) {
|
|
||||||
this._lastGrounded = _lastGrounded;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastMovement() {
|
|
||||||
return _lastMovement;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastMovement(long _lastMovement) {
|
|
||||||
this._lastMovement = _lastMovement;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Location GetLastLocation() {
|
|
||||||
return _lastLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastLocation(Location _lastLocation) {
|
|
||||||
this._lastLocation = _lastLocation;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastDamagee()
|
|
||||||
{
|
|
||||||
return _lastDamagee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastDamagee(long _lastDamaged) {
|
|
||||||
this._lastDamagee = _lastDamaged;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastDamager()
|
|
||||||
{
|
|
||||||
return _lastDamager;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetLastDamager(long _lastDamaged) {
|
|
||||||
this._lastDamager = _lastDamaged;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long GetLastCombat()
|
|
||||||
{
|
|
||||||
if (_lastDamager > _lastDamagee)
|
|
||||||
return _lastDamager;
|
|
||||||
return _lastDamagee;
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,253 +0,0 @@
|
|||||||
package me.chiss.Core.Modules;
|
|
||||||
|
|
||||||
import java.util.AbstractMap;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
|
||||||
import mineplex.core.MiniPlugin;
|
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
|
||||||
import mineplex.core.blockrestore.BlockRestore;
|
|
||||||
import mineplex.core.common.util.UtilAction;
|
|
||||||
import mineplex.core.common.util.UtilAlg;
|
|
||||||
import mineplex.core.common.util.UtilBlock;
|
|
||||||
import mineplex.core.common.util.UtilMath;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.block.Block;
|
|
||||||
import org.bukkit.entity.Entity;
|
|
||||||
import org.bukkit.entity.EntityType;
|
|
||||||
import org.bukkit.entity.FallingBlock;
|
|
||||||
import org.bukkit.entity.TNTPrimed;
|
|
||||||
import org.bukkit.event.EventHandler;
|
|
||||||
import org.bukkit.event.EventPriority;
|
|
||||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent;
|
|
||||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
|
||||||
import org.bukkit.event.entity.ItemSpawnEvent;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
import org.bukkit.util.Vector;
|
|
||||||
|
|
||||||
public class Explosion extends MiniPlugin
|
|
||||||
{
|
|
||||||
private boolean _damageEnabled = true;
|
|
||||||
private boolean _regenerateGround = false;
|
|
||||||
private HashSet<FallingBlock> _explosionBlocks = new HashSet<FallingBlock>();
|
|
||||||
|
|
||||||
private BlockRestore _blockRestore;
|
|
||||||
|
|
||||||
public Explosion(JavaPlugin plugin, BlockRestore blockRestore)
|
|
||||||
{
|
|
||||||
super("Block Restore", plugin);
|
|
||||||
|
|
||||||
_blockRestore = blockRestore;
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void ExplosionPrime(ExplosionPrimeEvent event)
|
|
||||||
{
|
|
||||||
if (event.getRadius() >= 5)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (Block block : UtilBlock.getInRadius(event.getEntity().getLocation(), (double) event.getRadius()).keySet())
|
|
||||||
if (block.isLiquid())
|
|
||||||
block.setTypeId(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void ExplosionEntity(EntityExplodeEvent event)
|
|
||||||
{
|
|
||||||
if (event.isCancelled())
|
|
||||||
return;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (event.getEntityType() == EntityType.CREEPER)
|
|
||||||
event.blockList().clear();
|
|
||||||
|
|
||||||
if (event.getEntityType() == EntityType.WITHER_SKULL)
|
|
||||||
event.blockList().clear();
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
//Bloop
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (event.blockList().isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
event.setYield(0f);
|
|
||||||
|
|
||||||
//Save
|
|
||||||
final HashMap<Block, Entry<Integer, Byte>> blocks = new HashMap<Block, Entry<Integer, Byte>>();
|
|
||||||
|
|
||||||
for (Block cur : event.blockList())
|
|
||||||
{
|
|
||||||
if (cur.getTypeId() == 0 || cur.isLiquid())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (cur.getType() == Material.CHEST ||
|
|
||||||
cur.getType() == Material.IRON_ORE ||
|
|
||||||
cur.getType() == Material.COAL_ORE ||
|
|
||||||
cur.getType() == Material.GOLD_ORE ||
|
|
||||||
cur.getType() == Material.DIAMOND_ORE)
|
|
||||||
{
|
|
||||||
cur.breakNaturally();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
blocks.put(cur, new AbstractMap.SimpleEntry<Integer, Byte>(cur.getTypeId(), cur.getData()));
|
|
||||||
|
|
||||||
if (!_regenerateGround)
|
|
||||||
{
|
|
||||||
if (cur.getTypeId() != 98 || cur.getData() != 0)
|
|
||||||
cur.setTypeId(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
|
||||||
_blockRestore.Add(cur, 0, (byte)0, 10000);
|
|
||||||
}
|
|
||||||
|
|
||||||
event.blockList().clear();
|
|
||||||
|
|
||||||
//DELAY
|
|
||||||
|
|
||||||
final Entity fEnt = event.getEntity();
|
|
||||||
final Location fLoc = event.getLocation();
|
|
||||||
_plugin.getServer().getScheduler().runTaskLater(_plugin, new Runnable()
|
|
||||||
{
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
//Launch
|
|
||||||
for (Block cur : blocks.keySet())
|
|
||||||
{
|
|
||||||
if (blocks.get(cur).getKey() == 98)
|
|
||||||
if (blocks.get(cur).getValue() == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
//TNT
|
|
||||||
if (blocks.get(cur).getKey() == 46)
|
|
||||||
{
|
|
||||||
TNTPrimed ent = cur.getWorld().spawn(cur.getLocation().add(0.5, 0.5, 0.5), TNTPrimed.class);
|
|
||||||
Vector vec = UtilAlg.getTrajectory(fEnt, ent);
|
|
||||||
if (vec.getY() < 0) vec.setY(vec.getY() * -1);
|
|
||||||
|
|
||||||
UtilAction.velocity(ent, vec, 1, false, 0, 0.6, 10, false);
|
|
||||||
|
|
||||||
ent.setFuseTicks(10);
|
|
||||||
}
|
|
||||||
//Other
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FallingBlock fall = cur.getWorld().spawnFallingBlock(cur.getLocation().add(0.5, 0.5, 0.5), blocks.get(cur).getKey(), blocks.get(cur).getValue());
|
|
||||||
|
|
||||||
Vector vec = UtilAlg.getTrajectory(fEnt, fall);
|
|
||||||
if (vec.getY() < 0) vec.setY(vec.getY() * -1);
|
|
||||||
|
|
||||||
vec.multiply(0.6 + 0.4*Math.random());
|
|
||||||
|
|
||||||
UtilAction.velocity(fall, vec, 0.75, false, 0, 0.6, 10, false);
|
|
||||||
|
|
||||||
_explosionBlocks.add(fall);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Items
|
|
||||||
/**
|
|
||||||
for (Item item : event.getEntity().getWorld().getEntitiesByClass(Item.class))
|
|
||||||
if (UtilMath.offset(item, event.getEntity()) < 5)
|
|
||||||
{
|
|
||||||
Vector vec = UtilAlg.getTrajectory(event.getEntity(), item);
|
|
||||||
if (vec.getY() < 0) vec.setY(vec.getY() * -1);
|
|
||||||
|
|
||||||
UtilAction.velocity(item, vec, 1, false, 0, 0.6, 10, false);
|
|
||||||
}
|
|
||||||
**/
|
|
||||||
|
|
||||||
//Crack
|
|
||||||
for (Block cur : UtilBlock.getInRadius(fLoc, 4d).keySet())
|
|
||||||
if (cur.getTypeId() == 98)
|
|
||||||
if (cur.getData() == 0)
|
|
||||||
cur.setTypeIdAndData(98, (byte)2, true);
|
|
||||||
}
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void ExplosionBlockUpdate(UpdateEvent event)
|
|
||||||
{
|
|
||||||
if (event.getType() != UpdateType.FAST)
|
|
||||||
return;
|
|
||||||
|
|
||||||
HashSet<FallingBlock> fallen = new HashSet<FallingBlock>();
|
|
||||||
|
|
||||||
for (FallingBlock cur : _explosionBlocks)
|
|
||||||
{
|
|
||||||
if (cur.isDead() || !cur.isValid() || cur.getTicksLived() > 600)
|
|
||||||
fallen.add(cur);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (FallingBlock cur : fallen)
|
|
||||||
{
|
|
||||||
_explosionBlocks.remove(cur);
|
|
||||||
|
|
||||||
if (cur.getTicksLived() > 600)
|
|
||||||
{
|
|
||||||
cur.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
Block block = cur.getLocation().getBlock();
|
|
||||||
block.setTypeIdAndData(0, (byte)0, true);
|
|
||||||
|
|
||||||
//Block Replace
|
|
||||||
_blockRestore.Add(block, cur.getBlockId(), cur.getBlockData(), 10000);
|
|
||||||
|
|
||||||
cur.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void ExplosionItemSpawn(ItemSpawnEvent event)
|
|
||||||
{
|
|
||||||
for (FallingBlock block : _explosionBlocks)
|
|
||||||
if (UtilMath.offset(event.getEntity().getLocation(), block.getLocation()) < 1)
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void ExplosionDamage(CustomDamageEvent event)
|
|
||||||
{
|
|
||||||
if (_damageEnabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (event.GetCause() == DamageCause.ENTITY_EXPLOSION || event.GetCause() == DamageCause.BLOCK_EXPLOSION)
|
|
||||||
event.SetCancelled("Explosion Damage Disabled");
|
|
||||||
}
|
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.LOW)
|
|
||||||
public void ExplosionBlocks(EntityExplodeEvent event)
|
|
||||||
{
|
|
||||||
if (event.getEntity() == null)
|
|
||||||
event.blockList().clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetDamage(boolean enabled)
|
|
||||||
{
|
|
||||||
_damageEnabled = enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetRegenerate(boolean regenerate)
|
|
||||||
{
|
|
||||||
_regenerateGround = regenerate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public HashSet<FallingBlock> GetExplosionBlocks()
|
|
||||||
{
|
|
||||||
return _explosionBlocks;
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,77 +0,0 @@
|
|||||||
package me.chiss.Core.Plugin;
|
|
||||||
|
|
||||||
import org.bukkit.Location;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
|
|
||||||
import me.chiss.Core.Clans.Clans;
|
|
||||||
import me.chiss.Core.Class.ClassFactory;
|
|
||||||
import me.chiss.Core.Client.CoreClientManager;
|
|
||||||
import me.chiss.Core.Combat.CombatManager;
|
|
||||||
import me.chiss.Core.Condition.ConditionManager;
|
|
||||||
import me.chiss.Core.Config.Config;
|
|
||||||
import me.chiss.Core.Damage.DamageManager;
|
|
||||||
import me.chiss.Core.Loot.LootFactory;
|
|
||||||
import me.chiss.Core.Module.ModuleManager;
|
|
||||||
import me.chiss.Core.Modules.*;
|
|
||||||
import me.chiss.Core.NAC.NAC;
|
|
||||||
import me.chiss.Core.Pet.PetManager;
|
|
||||||
import me.chiss.Core.PlayerTagNamer.INameColorer;
|
|
||||||
import me.chiss.Core.Punish.Punish;
|
|
||||||
import me.chiss.Core.Skill.SkillFactory;
|
|
||||||
|
|
||||||
public interface IPlugin
|
|
||||||
{
|
|
||||||
public void Log(String moduleName, String data);
|
|
||||||
|
|
||||||
public JavaPlugin GetPlugin();
|
|
||||||
|
|
||||||
public IRelation GetRelation();
|
|
||||||
|
|
||||||
public ModuleManager GetModules();
|
|
||||||
public Config GetConfig();
|
|
||||||
public CoreClientManager GetClients();
|
|
||||||
public Utility GetUtility();
|
|
||||||
|
|
||||||
public Punish GetBan();
|
|
||||||
public Blood GetBlood();
|
|
||||||
public BlockRegenerate GetBlockRegenerate();
|
|
||||||
public BlockRestore GetBlockRestore();
|
|
||||||
public NAC GetNAC();
|
|
||||||
public Clans GetClans();
|
|
||||||
public ClassFactory GetClasses();
|
|
||||||
public Compass GetCompass();
|
|
||||||
public ConditionManager GetCondition();
|
|
||||||
public CombatManager GetCombat();
|
|
||||||
public Creature GetCreature();
|
|
||||||
public DamageManager GetDamage();
|
|
||||||
public Donation GetDonation();
|
|
||||||
public Energy GetEnergy();
|
|
||||||
public Explosion GetExplosion();
|
|
||||||
public Field GetField();
|
|
||||||
public Fire GetFire();
|
|
||||||
public Fix GetFix();
|
|
||||||
public Give GetGive();
|
|
||||||
public Ignore GetIgnore();
|
|
||||||
public ItemStackFactory GetItemStackFactory();
|
|
||||||
public me.chiss.Core.Modules.Logger GetLogger();
|
|
||||||
public LootFactory GetLoot();
|
|
||||||
public Message GetMessage();
|
|
||||||
public Observer GetObserver();
|
|
||||||
public Recharge GetRecharge();
|
|
||||||
public Server GetServer();
|
|
||||||
public SkillFactory GetSkills();
|
|
||||||
public Spawn GetSpawn();
|
|
||||||
public Teleport GetTeleport();
|
|
||||||
public Throw GetThrow();
|
|
||||||
public Weapon GetWeapon();
|
|
||||||
public Wiki GetWiki();
|
|
||||||
public Location GetSpawnLocation();
|
|
||||||
|
|
||||||
public String GetWebServerAddress();
|
|
||||||
|
|
||||||
public INameColorer GetNameColorer();
|
|
||||||
|
|
||||||
public PetManager GetPetManager();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user