Maven
This commit is contained in:
@@ -25,8 +25,8 @@ public class ConfServer extends SimpleConfig
|
||||
|
||||
public static Map<String, String> alias2uri = MUtil.map(
|
||||
"default", "flatfile",
|
||||
"flatfile", "flatfile://mstore",
|
||||
"mongodb", "mongodb://localhost:27017/mstore"
|
||||
"flatfile", "flatfile://mstore",
|
||||
"mongodb", "mongodb://localhost:27017/mstore"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import java.util.Random;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.massivecraft.massivecore.mixin.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
@@ -66,22 +67,6 @@ import com.massivecraft.massivecore.engine.EngineMassiveCoreWorldNameSet;
|
||||
import com.massivecraft.massivecore.integration.vault.IntegrationVault;
|
||||
import com.massivecraft.massivecore.item.DataBannerPattern;
|
||||
import com.massivecraft.massivecore.item.WriterItemStack;
|
||||
import com.massivecraft.massivecore.mixin.MixinActionbar;
|
||||
import com.massivecraft.massivecore.mixin.MixinActual;
|
||||
import com.massivecraft.massivecore.mixin.MixinCommand;
|
||||
import com.massivecraft.massivecore.mixin.MixinDisplayName;
|
||||
import com.massivecraft.massivecore.mixin.MixinEvent;
|
||||
import com.massivecraft.massivecore.mixin.MixinGamemode;
|
||||
import com.massivecraft.massivecore.mixin.MixinInventory;
|
||||
import com.massivecraft.massivecore.mixin.MixinKick;
|
||||
import com.massivecraft.massivecore.mixin.MixinMessage;
|
||||
import com.massivecraft.massivecore.mixin.MixinModification;
|
||||
import com.massivecraft.massivecore.mixin.MixinPlayed;
|
||||
import com.massivecraft.massivecore.mixin.MixinSenderPs;
|
||||
import com.massivecraft.massivecore.mixin.MixinTeleport;
|
||||
import com.massivecraft.massivecore.mixin.MixinTitle;
|
||||
import com.massivecraft.massivecore.mixin.MixinVisibility;
|
||||
import com.massivecraft.massivecore.mixin.MixinWorld;
|
||||
import com.massivecraft.massivecore.mson.Mson;
|
||||
import com.massivecraft.massivecore.mson.MsonEvent;
|
||||
import com.massivecraft.massivecore.nms.NmsBasics;
|
||||
@@ -315,6 +300,7 @@ public class MassiveCore extends MassivePlugin
|
||||
MixinGamemode.class,
|
||||
MixinInventory.class,
|
||||
MixinKick.class,
|
||||
MixinMassiveCraftPremium.class,
|
||||
MixinMessage.class,
|
||||
MixinModification.class,
|
||||
MixinPlayed.class,
|
||||
|
||||
@@ -23,17 +23,17 @@ public class MassiveMap<K, V> extends LinkedHashMap<K, V>
|
||||
|
||||
public MassiveMap(int initialCapacity, float loadFactor)
|
||||
{
|
||||
super(initialCapacity, loadFactor);
|
||||
super(initialCapacity, loadFactor);
|
||||
}
|
||||
|
||||
public MassiveMap(int initialCapacity)
|
||||
{
|
||||
super(initialCapacity);
|
||||
super(initialCapacity);
|
||||
}
|
||||
|
||||
public MassiveMap()
|
||||
{
|
||||
super();
|
||||
super();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@@ -45,7 +45,7 @@ public class MassiveMap<K, V> extends LinkedHashMap<K, V>
|
||||
|
||||
public MassiveMap(int initialCapacity, float loadFactor, boolean accessOrder)
|
||||
{
|
||||
super(initialCapacity, loadFactor, accessOrder);
|
||||
super(initialCapacity, loadFactor, accessOrder);
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
||||
@@ -20,17 +20,17 @@ public class MassiveMapDef<K, V> extends MassiveMap<K, V> implements Def
|
||||
|
||||
public MassiveMapDef(int initialCapacity, float loadFactor)
|
||||
{
|
||||
super(initialCapacity, loadFactor);
|
||||
super(initialCapacity, loadFactor);
|
||||
}
|
||||
|
||||
public MassiveMapDef(int initialCapacity)
|
||||
{
|
||||
super(initialCapacity);
|
||||
super(initialCapacity);
|
||||
}
|
||||
|
||||
public MassiveMapDef()
|
||||
{
|
||||
super();
|
||||
super();
|
||||
}
|
||||
|
||||
public MassiveMapDef(Map<? extends K, ? extends V> m)
|
||||
@@ -40,7 +40,7 @@ public class MassiveMapDef<K, V> extends MassiveMap<K, V> implements Def
|
||||
|
||||
public MassiveMapDef(int initialCapacity, float loadFactor, boolean accessOrder)
|
||||
{
|
||||
super(initialCapacity, loadFactor, accessOrder);
|
||||
super(initialCapacity, loadFactor, accessOrder);
|
||||
}
|
||||
|
||||
public MassiveMapDef(K key1, V value1, Object... objects)
|
||||
|
||||
@@ -16,10 +16,10 @@ public class MassiveCommandHelp extends MassiveCommand
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
|
||||
protected static MassiveCommandHelp i = new MassiveCommandHelp();
|
||||
public static MassiveCommandHelp get() { return i; }
|
||||
public MassiveCommandHelp()
|
||||
public MassiveCommandHelp()
|
||||
{
|
||||
// Aliases
|
||||
this.addAliases("?", "h", "help");
|
||||
@@ -67,13 +67,13 @@ public class MassiveCommandHelp extends MassiveCommand
|
||||
{
|
||||
boolean visible = super.isVisibleTo(sender);
|
||||
if ( ! (this.hasParent() && visible)) return visible;
|
||||
|
||||
|
||||
int visibleSiblingCount = 0;
|
||||
for (MassiveCommand sibling : this.getParent().getChildren())
|
||||
{
|
||||
if (sibling instanceof MassiveCommandHelp) continue;
|
||||
if (sibling.isVisibleTo(sender)) visibleSiblingCount++;
|
||||
}
|
||||
}
|
||||
|
||||
int pageHeight = (sender instanceof Player) ? Txt.PAGEHEIGHT_PLAYER : Txt.PAGEHEIGHT_CONSOLE;
|
||||
return visibleSiblingCount > pageHeight;
|
||||
|
||||
@@ -24,7 +24,7 @@ public abstract class TypeAbstractSelect<T> extends TypeAbstract<T> implements A
|
||||
// ABSTRACT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public abstract T select(String str, CommandSender sender) throws MassiveException;
|
||||
public abstract T select(String str, CommandSender sender) throws MassiveException;
|
||||
|
||||
public boolean canList(CommandSender sender) { return true; }
|
||||
|
||||
@@ -44,7 +44,7 @@ public abstract class TypeAbstractSelect<T> extends TypeAbstract<T> implements A
|
||||
@Override
|
||||
public T read(String arg, CommandSender sender) throws MassiveException
|
||||
{
|
||||
T result = this.select(arg, sender);
|
||||
T result = this.select(arg, sender);
|
||||
if (result != null) return result;
|
||||
|
||||
MassiveException exception = createExceptionForInvalidArg(arg, sender);
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.util.List;
|
||||
|
||||
import com.massivecraft.massivecore.collections.MassiveList;
|
||||
import com.massivecraft.massivecore.command.type.Type;
|
||||
|
||||
public class TypeList<E> extends TypeContainer<List<E>, E>
|
||||
|
||||
public class TypeList<E> extends TypeContainer<List<E>, E>
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
@@ -30,5 +30,5 @@ public class TypeList<E> extends TypeContainer<List<E>, E>
|
||||
{
|
||||
return new MassiveList<E>();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import java.util.Set;
|
||||
|
||||
import com.massivecraft.massivecore.collections.MassiveSet;
|
||||
import com.massivecraft.massivecore.command.type.Type;
|
||||
|
||||
public class TypeSet<E> extends TypeContainer<Set<E>, E>
|
||||
|
||||
public class TypeSet<E> extends TypeContainer<Set<E>, E>
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
package com.massivecraft.massivecore.command.type.primitive;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.massivecraft.massivecore.command.type.TypeAbstract;
|
||||
|
||||
public class TypeString extends TypeAbstract<String>
|
||||
public class TypeString extends TypeAbstract<String>
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
|
||||
@@ -116,8 +116,8 @@ public abstract class TypeSenderIdAbstract<T> extends TypeAbstract<T>
|
||||
|
||||
if (ret == null)
|
||||
{
|
||||
// No alternatives found
|
||||
throw new MassiveException().addMessage(this.getErrorMessageForArg(arg));
|
||||
// No alternatives found
|
||||
throw new MassiveException().addMessage(this.getErrorMessageForArg(arg));
|
||||
}
|
||||
|
||||
// Return Ret
|
||||
|
||||
@@ -92,8 +92,8 @@ public class EngineMassiveCoreGank extends Engine
|
||||
// -------------------------------------------- //
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onEntityDamage(EntityDamageByEntityEvent event)
|
||||
{
|
||||
public void onEntityDamage(EntityDamageByEntityEvent event)
|
||||
{
|
||||
// If an entity ...
|
||||
Entity entity = event.getEntity();
|
||||
|
||||
@@ -123,6 +123,6 @@ public class EngineMassiveCoreGank extends Engine
|
||||
|
||||
// ... and set.
|
||||
playerDamages.put(player, playerDamage);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -159,10 +159,10 @@ public class EngineMassiveCoreSponsor extends Engine
|
||||
// -------------------------------------------- //
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
public void onPlayerJoin(PlayerJoinEvent event)
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
this.inform(player);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.massivecraft.massivecore.mixin;
|
||||
|
||||
public class MixinMassiveCraftPremium extends Mixin
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static MixinMassiveCraftPremium d = new MixinMassiveCraftPremium();
|
||||
private static MixinMassiveCraftPremium i = d;
|
||||
public static MixinMassiveCraftPremium get() { return i; }
|
||||
|
||||
// -------------------------------------------- //
|
||||
// METHODS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public boolean isPremium(Object senderObject)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,8 +5,8 @@ import java.util.regex.Pattern;
|
||||
public class PredicateElementGarbage extends PredicateElementRegexes
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static PredicateElementGarbage i = new PredicateElementGarbage();
|
||||
public static PredicateElementGarbage get() { return i; }
|
||||
|
||||
@@ -11,8 +11,8 @@ import com.massivecraft.massivecore.collections.MassiveList;
|
||||
public class PredicateElementRegexes implements Predicate<StackTraceElement>
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
// FIELDS
|
||||
// -------------------------------------------- //
|
||||
|
||||
private List<Pattern> patterns = Collections.emptyList();
|
||||
public List<Pattern> getPatterns() { return this.patterns; }
|
||||
@@ -20,8 +20,8 @@ public class PredicateElementRegexes implements Predicate<StackTraceElement>
|
||||
public void setPatterns(Iterable<String> regexes) { this.setPatterns(asPatterns(regexes));}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
// CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
public PredicateElementRegexes(String... regexes)
|
||||
{
|
||||
@@ -29,8 +29,8 @@ public class PredicateElementRegexes implements Predicate<StackTraceElement>
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
// OVERRIDE
|
||||
// -------------------------------------------- //
|
||||
|
||||
@Override
|
||||
public boolean apply(StackTraceElement element)
|
||||
@@ -45,8 +45,8 @@ public class PredicateElementRegexes implements Predicate<StackTraceElement>
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// UTIL
|
||||
// -------------------------------------------- //
|
||||
// UTIL
|
||||
// -------------------------------------------- //
|
||||
|
||||
protected List<Pattern> asPatterns(Iterable<String> regexes)
|
||||
{
|
||||
|
||||
@@ -5,8 +5,8 @@ import java.util.regex.Pattern;
|
||||
public class PredicateElementSignificant extends PredicateElementRegexes
|
||||
{
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
// INSTANCE & CONSTRUCT
|
||||
// -------------------------------------------- //
|
||||
|
||||
private static PredicateElementSignificant i = new PredicateElementSignificant();
|
||||
public static PredicateElementSignificant get() { return i; }
|
||||
|
||||
@@ -1135,5 +1135,5 @@ public class Coll<E extends Entity<E>> extends CollAbstract<E>
|
||||
{
|
||||
return this.getByName(str) != null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -347,11 +347,11 @@ public class MUtil
|
||||
|
||||
String ret = address.toString();
|
||||
String[] parts = ret.split("/");
|
||||
|
||||
ret = parts[1];
|
||||
parts = ret.split(":");
|
||||
|
||||
ret = parts[0];
|
||||
|
||||
ret = parts[1];
|
||||
parts = ret.split(":");
|
||||
|
||||
ret = parts[0];
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -367,8 +367,8 @@ public class MUtil
|
||||
|
||||
String ret = address.toString();
|
||||
String[] parts = ret.split("/");
|
||||
|
||||
ret = parts[1];
|
||||
|
||||
ret = parts[1];
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1882,11 +1882,11 @@ public class MUtil
|
||||
|
||||
public static double round(double value, int places)
|
||||
{
|
||||
if (places < 0) throw new IllegalArgumentException();
|
||||
if (places < 0) throw new IllegalArgumentException();
|
||||
|
||||
BigDecimal bd = new BigDecimal(value);
|
||||
bd = bd.setScale(places, RoundingMode.HALF_UP);
|
||||
return bd.doubleValue();
|
||||
BigDecimal bd = new BigDecimal(value);
|
||||
bd = bd.setScale(places, RoundingMode.HALF_UP);
|
||||
return bd.doubleValue();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
|
||||
@@ -110,7 +110,7 @@ public class SignUtil
|
||||
// Returns true if the result is a special sign of with the specified title.
|
||||
|
||||
public static boolean handleSpecialPermissionFix(SignChangeEvent event, String title, String permissionId)
|
||||
{
|
||||
{
|
||||
if (event == null) throw new NullPointerException("event");
|
||||
if (title == null) throw new NullPointerException("title");
|
||||
if (permissionId == null) throw new NullPointerException("permissionId");
|
||||
@@ -135,7 +135,7 @@ public class SignUtil
|
||||
// ... and fix the first line.
|
||||
event.setLine(0, getSpecialLine(title));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// SPECIAL PILLAR
|
||||
|
||||
@@ -169,7 +169,7 @@ public class TimeUnit implements Comparable<TimeUnit>
|
||||
@Override
|
||||
public final int hashCode()
|
||||
{
|
||||
return (int)(this.millis^(this.millis>>>32));
|
||||
return (int)(this.millis^(this.millis>>>32));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -186,8 +186,8 @@ public class WebUtil
|
||||
{
|
||||
if ( ! (connection instanceof HttpsURLConnection)) return;
|
||||
HttpsURLConnection httpsConnection = (HttpsURLConnection) connection;
|
||||
httpsConnection.setSSLSocketFactory(TRUSTING_SOCKET_FACTORY);
|
||||
httpsConnection.setHostnameVerifier(TRUSTING_HOSTNAME_VERIFIER);
|
||||
httpsConnection.setSSLSocketFactory(TRUSTING_SOCKET_FACTORY);
|
||||
httpsConnection.setHostnameVerifier(TRUSTING_HOSTNAME_VERIFIER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user