{
/*
- * You might notice that no fields in this class are volatile. Normally, when you double lock, you must do
- * something like this to be totally correct:
- *
- *
- * volatile Object value = null; // Note the volatility
- * construct() {
- * Object result = value;
- * if(result == null) {
- * synchronized(result) {
- * if(result == null) {
- * result = new Object();
- * value = result;
- * }
- * }
- * }
- * return result;
- * }
- *
- *
- * Note that we are doing the double locking per usual, but the value is volatile. The local result value seems
- * unnecessary at first, but the effect of this is that in cases where value is already initialized
- * (i.e., most of the time), the volatile field is only accessed once (due to "return result;" instead of
- * "return value;"), which can improve the method's overall performance by as much as 25 percent.
- *
- * However, in the case that we have before us, the ConcurrentHashMap handles this for us, by guaranteeing that
- * we never get a value that is partially constructed in the get() method.
- *
- *
+ * You might notice that no fields in this class are volatile. Normally, when you double lock, you must do
+ * something like this to be totally correct:
+ *
+ *
+ * volatile Object value = null; // Note the volatility
+ * construct() {
+ * Object result = value;
+ * if(result == null) {
+ * synchronized(result) {
+ * if(result == null) {
+ * result = new Object();
+ * value = result;
+ * }
+ * }
+ * }
+ * return result;
+ * }
+ *
+ *
+ * Note that we are doing the double locking per usual, but the value is volatile. The local result value seems
+ * unnecessary at first, but the effect of this is that in cases where value is already initialized
+ * (i.e., most of the time), the volatile field is only accessed once (due to "return result;" instead of
+ * "return value;"), which can improve the method's overall performance by as much as 25 percent.
+ *
+ * However, in the case that we have before us, the ConcurrentHashMap handles this for us, by guaranteeing that
+ * we never get a value that is partially constructed in the get() method.
+ *
+ *
*/
private final Map map = new ConcurrentHashMap<>();
private final ValueGenerator generator;
diff --git a/src/main/java/com/laytonsmith/PureUtilities/ExhaustiveVisitor.java b/src/main/java/com/laytonsmith/PureUtilities/ExhaustiveVisitor.java
index b145df3ecc..4a8a7e7486 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/ExhaustiveVisitor.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/ExhaustiveVisitor.java
@@ -56,20 +56,20 @@
* public static class PhoneNumber implements UserID {
* {@code @Override}
* public void accept(UserIDVisitor visitor) {
- * visitor.handle(this);
+ * visitor.handle(this);
* }
* }
* public static abstract class GeneratedID implements UserID {}
* public static class GeneratedIDV1 extends GeneratedID {
* {@code @Override}
* public void accept(UserIDVisitor visitor) {
- * visitor.handle(this);
+ * visitor.handle(this);
* }
* }
* public static class GeneratedIDV2 extends GeneratedID {
* {@code @Override}
* public void accept(UserIDVisitor visitor) {
- * visitor.handle(this);
+ * visitor.handle(this);
* }
* }
*
@@ -78,17 +78,17 @@
*
* {@code @Override}
* public void handle(PhoneNumber m) {
- * System.out.println("Canadian PhoneNumber");
+ * System.out.println("Canadian PhoneNumber");
* }
*
* {@code @Override}
* public void handle(GeneratedIDV1 c) {
- * System.out.println("Canadian GeneratedIDV1");
+ * System.out.println("Canadian GeneratedIDV1");
* }
*
* {@code @Override}
* public void handle(GeneratedIDV2 c) {
- * System.out.println("Canadian GeneratedIDV2");
+ * System.out.println("Canadian GeneratedIDV2");
* }
*
* }
@@ -97,17 +97,17 @@
*
* {@code @Override}
* public void handle(PhoneNumber m) {
- * System.out.println("American PhoneNumber");
+ * System.out.println("American PhoneNumber");
* }
*
* {@code @Override}
* public void handle(GeneratedIDV1 c) {
- * System.out.println("American GeneratedIDV1");
+ * System.out.println("American GeneratedIDV1");
* }
*
* {@code @Override}
* public void handle(GeneratedIDV2 c) {
- * System.out.println("American GeneratedIDV2");
+ * System.out.println("American GeneratedIDV2");
* }
*
* }
@@ -141,30 +141,30 @@
* {@code @ExhaustiveVisitor.VisitorInfo(baseClass = UserID.class, directSubclassOnly = false)}
* public static class CanadianVisitor extends ExhaustiveVisitor {
* public void visit(PhoneNumber n) {
- * System.out.println("Canadian PhoneNumber");
+ * System.out.println("Canadian PhoneNumber");
* }
*
* public void visit(GeneratedIDV1 id) {
- * System.out.println("Canadian GeneratedIDV1");
+ * System.out.println("Canadian GeneratedIDV1");
* }
*
* public void visit(GeneratedIDV2 id) {
- * System.out.println("Canadian GeneratedIDV1");
+ * System.out.println("Canadian GeneratedIDV1");
* }
* }
*
* {@code @ExhaustiveVisitor.VisitorInfo(baseClass = UserID.class, directSubclassOnly = false)}
* public static class AmericanVisitor extends ExhaustiveVisitor {
* public void visit(PhoneNumber n) {
- * System.out.println("American PhoneNumber");
+ * System.out.println("American PhoneNumber");
* }
*
* public void visit(GeneratedIDV1 id) {
- * System.out.println("American GeneratedIDV1");
+ * System.out.println("American GeneratedIDV1");
* }
*
* public void visit(GeneratedIDV2 id) {
- * System.out.println("American GeneratedIDV1");
+ * System.out.println("American GeneratedIDV1");
* }
* }
*
diff --git a/src/main/java/com/laytonsmith/PureUtilities/HeapDumper.java b/src/main/java/com/laytonsmith/PureUtilities/HeapDumper.java
index 02fbbae407..f5ce4a3b87 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/HeapDumper.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/HeapDumper.java
@@ -9,7 +9,7 @@ public class HeapDumper {
private static final String HOTSPOT_BEAN_NAME
= "com.sun.management:type=HotSpotDiagnostic";
- // field to store the hotspot diagnostic MBean
+ // field to store the hotspot diagnostic MBean
private static volatile HotSpotDiagnosticMXBean hotspotMBean;
/**
diff --git a/src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java b/src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java
index 1338906d57..e71500687b 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/MemoryMapFileUtil.java
@@ -104,12 +104,13 @@ private void run() {
// }
} catch(IOException ex) {
Logger.getLogger(MemoryMapFileUtil.class.getName()).log(Level.SEVERE, null, ex);
- } finally {
+ }
+// finally {
// if(temp != null){
// temp.delete();
// temp.deleteOnExit();
// }
- }
+// }
}
} finally {
synchronized(this) {
diff --git a/src/main/java/com/laytonsmith/PureUtilities/PropertiesManager.java b/src/main/java/com/laytonsmith/PureUtilities/PropertiesManager.java
index 6cb9bda86c..b1ff77153c 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/PropertiesManager.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/PropertiesManager.java
@@ -185,10 +185,10 @@ private void load(LineReader lr) throws IOException {
}
/* Read in a "logical line" from an InputStream/Reader, skip all comment
- * and blank lines and filter out those leading whitespace characters
- * (\u0020, \u0009 and \u000c) from the beginning of a "natural line".
- * Method returns the char length of the "logical line" and stores
- * the line in "lineBuf".
+ * and blank lines and filter out those leading whitespace characters
+ * (\u0020, \u0009 and \u000c) from the beginning of a "natural line".
+ * Method returns the char length of the "logical line" and stores
+ * the line in "lineBuf".
*/
class LineReader {
@@ -317,8 +317,8 @@ int readLine() throws IOException {
}
/*
- * Converts encoded \uxxxx to unicode chars
- * and changes special saved chars to their original forms
+ * Converts encoded \uxxxx to unicode chars
+ * and changes special saved chars to their original forms
*/
private String loadConvert(char[] in, int off, int len, char[] convtBuf) {
if(convtBuf.length < len) {
diff --git a/src/main/java/com/laytonsmith/PureUtilities/TermColors.java b/src/main/java/com/laytonsmith/PureUtilities/TermColors.java
index 1fe6540aa6..c79a9bf759 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/TermColors.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/TermColors.java
@@ -57,7 +57,7 @@ public static void cls() {
}
/*
- * Standard foreground colors
+ * Standard foreground colors
*/
@color
public static String RED = color(Color.RED);
@@ -77,7 +77,7 @@ public static void cls() {
public static String WHITE = color(Color.WHITE);
/*
- * Bright foreground colors
+ * Bright foreground colors
*/
@color
public static String BRIGHT_RED = color(Color.RED, true, true, true);
@@ -97,7 +97,7 @@ public static void cls() {
public static String BRIGHT_WHITE = color(Color.WHITE, true, true, true);
/*
- * Standard background colors
+ * Standard background colors
*/
@color
public static String BG_RED = color(Color.RED, false, false, false);
@@ -117,7 +117,7 @@ public static void cls() {
public static String BG_WHITE = color(Color.WHITE, false, false, false);
/*
- * Bright background colors
+ * Bright background colors
*/
@color
public static String BG_BRIGHT_RED = color(Color.RED, true, false, false);
diff --git a/src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java b/src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java
index 7f52ec45af..81ffee9893 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/UI/TextDialog.java
@@ -126,62 +126,62 @@ public void setOKButtonText(String text) {
* content of this method is always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
- // //GEN-BEGIN:initComponents
- private void initComponents() {
-
- jPanel1 = new javax.swing.JPanel();
- okButton = new javax.swing.JButton();
- jScrollPane2 = new javax.swing.JScrollPane();
- inputDialog = new javax.swing.JEditorPane();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- okButton.setText("Ok");
- okButton.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
- okButton.setSelected(true);
-
- jScrollPane2.setAutoscrolls(true);
-
- inputDialog.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
- inputDialog.setMinimumSize(new java.awt.Dimension(20, 10));
- jScrollPane2.setViewportView(inputDialog);
-
- javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
- jPanel1.setLayout(jPanel1Layout);
- jPanel1Layout.setHorizontalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
- .addContainerGap())
- .addGroup(jPanel1Layout.createSequentialGroup()
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(okButton)
- .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
- );
- jPanel1Layout.setVerticalGroup(
- jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
- .addContainerGap()
- .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
- .addComponent(okButton)
- .addContainerGap())
- );
-
- javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
- layout.setVerticalGroup(
- layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- );
-
- pack();
- }// //GEN-END:initComponents
+ // //GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jPanel1 = new javax.swing.JPanel();
+ okButton = new javax.swing.JButton();
+ jScrollPane2 = new javax.swing.JScrollPane();
+ inputDialog = new javax.swing.JEditorPane();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ okButton.setText("Ok");
+ okButton.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
+ okButton.setSelected(true);
+
+ jScrollPane2.setAutoscrolls(true);
+
+ inputDialog.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
+ inputDialog.setMinimumSize(new java.awt.Dimension(20, 10));
+ jScrollPane2.setViewportView(inputDialog);
+
+ javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+ jPanel1.setLayout(jPanel1Layout);
+ jPanel1Layout.setHorizontalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE)
+ .addContainerGap())
+ .addGroup(jPanel1Layout.createSequentialGroup()
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .addComponent(okButton)
+ .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+ );
+ jPanel1Layout.setVerticalGroup(
+ jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+ .addComponent(okButton)
+ .addContainerGap())
+ );
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+
+ pack();
+ }// //GEN-END:initComponents
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@@ -195,10 +195,10 @@ public void run() {
});
}
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JEditorPane inputDialog;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JScrollPane jScrollPane2;
- private javax.swing.JButton okButton;
- // End of variables declaration//GEN-END:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JEditorPane inputDialog;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JScrollPane jScrollPane2;
+ private javax.swing.JButton okButton;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/src/main/java/com/laytonsmith/PureUtilities/VirtualFS/FileSystemLayer.java b/src/main/java/com/laytonsmith/PureUtilities/VirtualFS/FileSystemLayer.java
index f5917126c0..39f99359fb 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/VirtualFS/FileSystemLayer.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/VirtualFS/FileSystemLayer.java
@@ -20,58 +20,58 @@
*/
public abstract class FileSystemLayer {
- protected final VirtualFile path;
- protected final VirtualFileSystem fileSystem;
+ protected final VirtualFile path;
+ protected final VirtualFileSystem fileSystem;
- protected FileSystemLayer(VirtualFile path, VirtualFileSystem fileSystem) {
- this.path = path;
- this.fileSystem = fileSystem;
- }
+ protected FileSystemLayer(VirtualFile path, VirtualFileSystem fileSystem) {
+ this.path = path;
+ this.fileSystem = fileSystem;
+ }
- public abstract InputStream getInputStream() throws IOException;
+ public abstract InputStream getInputStream() throws IOException;
- public abstract void writeByteArray(byte[] bytes) throws IOException;
+ public abstract void writeByteArray(byte[] bytes) throws IOException;
- public abstract VirtualFile[] listFiles() throws IOException;
+ public abstract VirtualFile[] listFiles() throws IOException;
- public abstract void delete() throws IOException;
+ public abstract void delete() throws IOException;
- /**
- * This may work the exact same as delete in some cases, but otherwise, the
- * file will be deleted upon exit of the virtual machine.
- *
- * @throws IOException
- */
- public abstract void deleteOnExit() throws IOException;
+ /**
+ * This may work the exact same as delete in some cases, but otherwise, the
+ * file will be deleted upon exit of the virtual machine.
+ *
+ * @throws IOException
+ */
+ public abstract void deleteOnExit() throws IOException;
- public abstract boolean exists() throws IOException;
+ public abstract boolean exists() throws IOException;
- public abstract boolean canRead() throws IOException;
+ public abstract boolean canRead() throws IOException;
- public abstract boolean canWrite() throws IOException;
+ public abstract boolean canWrite() throws IOException;
- public abstract boolean isDirectory() throws IOException;
+ public abstract boolean isDirectory() throws IOException;
- public abstract boolean isFile() throws IOException;
+ public abstract boolean isFile() throws IOException;
- public abstract void mkdirs() throws IOException;
+ public abstract void mkdirs() throws IOException;
- public abstract void createNewFile() throws IOException;
+ public abstract void createNewFile() throws IOException;
- /**
- * Used to denote a FileSystemLayer protocol
- */
- @Retention(RetentionPolicy.RUNTIME)
- @Target(ElementType.TYPE)
- public static @interface fslayer {
+ /**
+ * Used to denote a FileSystemLayer protocol
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ @Target(ElementType.TYPE)
+ public static @interface fslayer {
- /**
- * The protocol identifier, for instance, "file", which would map to a
- * file://uri type uri.
- *
- * @return
- */
- String value();
- }
+ /**
+ * The protocol identifier, for instance, "file", which would map to a
+ * file://uri type uri.
+ *
+ * @return
+ */
+ String value();
+ }
}
diff --git a/src/main/java/com/laytonsmith/PureUtilities/Web/WebUtility.java b/src/main/java/com/laytonsmith/PureUtilities/Web/WebUtility.java
index 8423de8268..cf36db0a58 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/Web/WebUtility.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/Web/WebUtility.java
@@ -4,7 +4,15 @@
import com.laytonsmith.PureUtilities.Common.StreamUtils;
import com.laytonsmith.PureUtilities.Common.StringUtils;
-import java.io.*;
+import java.io.BufferedOutputStream;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.InetAddress;
import java.net.InetSocketAddress;
diff --git a/src/main/java/com/laytonsmith/PureUtilities/ZipMaker.java b/src/main/java/com/laytonsmith/PureUtilities/ZipMaker.java
index 5efa1980f4..d55e213925 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/ZipMaker.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/ZipMaker.java
@@ -81,7 +81,7 @@ private static void MakeZip(Set files, File output, File base, String topL
for(File f : files) {
FileInputStream in = new FileInputStream(new File(base, f.getPath()));
- // Add ZIP entry to output stream.
+ // Add ZIP entry to output stream.
out.putNextEntry(new ZipEntry(topLevel + GetUnabsoluteFile(base, f).getPath()));
// Transfer bytes from the file to the ZIP file
diff --git a/src/main/java/com/laytonsmith/PureUtilities/ZipReader.java b/src/main/java/com/laytonsmith/PureUtilities/ZipReader.java
index 63da20a6b0..cc68eb7322 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/ZipReader.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/ZipReader.java
@@ -203,8 +203,8 @@ public boolean isZipped() {
}
/*
- * This function recurses down into a zip file, ultimately returning the InputStream for the file,
- * or throwing exceptions if it can't be found.
+ * This function recurses down into a zip file, ultimately returning the InputStream for the file,
+ * or throwing exceptions if it can't be found.
*/
private InputStream getFile(Deque fullChain, String zipName, final ZipInputStream zis) throws FileNotFoundException, IOException {
ZipEntry entry;
diff --git a/src/main/java/com/laytonsmith/PureUtilities/rParser.java b/src/main/java/com/laytonsmith/PureUtilities/rParser.java
index e031476873..e05c064264 100644
--- a/src/main/java/com/laytonsmith/PureUtilities/rParser.java
+++ b/src/main/java/com/laytonsmith/PureUtilities/rParser.java
@@ -17,7 +17,7 @@ private rParser() {
private static final int lineLength = 312;
/*
- * Finds the last color sequence used in the string
+ * Finds the last color sequence used in the string
*/
public static String lastColor(String findColor) {
int i = findColor.lastIndexOf('§');
@@ -28,8 +28,8 @@ public static String lastColor(String findColor) {
}
}
- /*
- *
+ /*
+ *
*/
public static String combineSplit(int beginHere, String[] split, String seperator) {
StringBuilder combined = new StringBuilder(split[beginHere]);
@@ -187,7 +187,7 @@ private static int charLength(char x) {
//=====================================================================
//Function: colorChange
//Input: char colour: The color code to find the color for
- //Output: String: The color that the code identified
+ //Output: String: The color that the code identified
//Use: Finds a color giving a color code
//=====================================================================
public static String colorChange(char colour) {
diff --git a/src/main/java/com/laytonsmith/abstraction/MCInventoryHolder.java b/src/main/java/com/laytonsmith/abstraction/MCInventoryHolder.java
index 95d8f2ed2f..28a54a27ee 100644
--- a/src/main/java/com/laytonsmith/abstraction/MCInventoryHolder.java
+++ b/src/main/java/com/laytonsmith/abstraction/MCInventoryHolder.java
@@ -2,5 +2,5 @@
public interface MCInventoryHolder extends AbstractionObject {
- MCInventory getInventory();
+ MCInventory getInventory();
}
diff --git a/src/main/java/com/laytonsmith/abstraction/MCItemMeta.java b/src/main/java/com/laytonsmith/abstraction/MCItemMeta.java
index 257383a675..5610809bd0 100644
--- a/src/main/java/com/laytonsmith/abstraction/MCItemMeta.java
+++ b/src/main/java/com/laytonsmith/abstraction/MCItemMeta.java
@@ -7,103 +7,103 @@
public interface MCItemMeta extends AbstractionObject {
- /**
- * Checks for existence of a display name
- *
- * @return true if this has a display name
- */
- boolean hasDisplayName();
-
- /**
- * Gets the display name that is set
- *
- * @return the display name that is set
- */
- String getDisplayName();
-
- /**
- * Sets the display name
- *
- * @param name the name to set
- */
- void setDisplayName(String name);
-
- /**
- * Checks for existence of lore
- *
- * @return true if this has lore
- */
- boolean hasLore();
-
- /**
- * Gets the lore that is set
- *
- * @return a list of lore that is set
- */
- List getLore();
-
- /**
- * Sets the lore for this item
- *
- * @param lore the lore that will be set
- */
- void setLore(List lore);
-
- /**
- * Checks if this item has any enchantments
- *
- * @return true if there are enchantments
- */
- boolean hasEnchants();
-
- /**
- * Gets the enchantments on this items
- *
- * @return a map of MCEnchantment keys and enchantLevel values
- */
- Map getEnchants();
-
- /**
- * Adds a given enchantment to this meta
- *
- * @param ench The type of enchantment to add
- * @param level The level of enchantment
- * @param ignoreLevelRestriction Should adding an outrageous level be
- * allowed?
- * @return whether the enchantment was added successfully
- */
- boolean addEnchant(MCEnchantment ench, int level, boolean ignoreLevelRestriction);
-
- /**
- * Set itemflags which should be ignored when rendering a MCItemStack in the
- * Client.
- *
- * @param flags The flags to ignore.
- */
- void addItemFlags(MCItemFlag... flags);
-
- /**
- * Get current set itemFlags.
- *
- * @return A set of all itemFlags set
- */
- Set getItemFlags();
-
- /**
- * Removes a given enchantment from this meta
- *
- * @param ench The type of enchantment to remove
- * @return whether the enchantment was removed successfully
- */
- boolean removeEnchant(MCEnchantment ench);
-
- boolean hasRepairCost();
-
- int getRepairCost();
-
- void setRepairCost(int cost);
-
- boolean isUnbreakable();
-
- void setUnbreakable(boolean unbreakable);
+ /**
+ * Checks for existence of a display name
+ *
+ * @return true if this has a display name
+ */
+ boolean hasDisplayName();
+
+ /**
+ * Gets the display name that is set
+ *
+ * @return the display name that is set
+ */
+ String getDisplayName();
+
+ /**
+ * Sets the display name
+ *
+ * @param name the name to set
+ */
+ void setDisplayName(String name);
+
+ /**
+ * Checks for existence of lore
+ *
+ * @return true if this has lore
+ */
+ boolean hasLore();
+
+ /**
+ * Gets the lore that is set
+ *
+ * @return a list of lore that is set
+ */
+ List getLore();
+
+ /**
+ * Sets the lore for this item
+ *
+ * @param lore the lore that will be set
+ */
+ void setLore(List lore);
+
+ /**
+ * Checks if this item has any enchantments
+ *
+ * @return true if there are enchantments
+ */
+ boolean hasEnchants();
+
+ /**
+ * Gets the enchantments on this items
+ *
+ * @return a map of MCEnchantment keys and enchantLevel values
+ */
+ Map getEnchants();
+
+ /**
+ * Adds a given enchantment to this meta
+ *
+ * @param ench The type of enchantment to add
+ * @param level The level of enchantment
+ * @param ignoreLevelRestriction Should adding an outrageous level be
+ * allowed?
+ * @return whether the enchantment was added successfully
+ */
+ boolean addEnchant(MCEnchantment ench, int level, boolean ignoreLevelRestriction);
+
+ /**
+ * Set itemflags which should be ignored when rendering a MCItemStack in the
+ * Client.
+ *
+ * @param flags The flags to ignore.
+ */
+ void addItemFlags(MCItemFlag... flags);
+
+ /**
+ * Get current set itemFlags.
+ *
+ * @return A set of all itemFlags set
+ */
+ Set getItemFlags();
+
+ /**
+ * Removes a given enchantment from this meta
+ *
+ * @param ench The type of enchantment to remove
+ * @return whether the enchantment was removed successfully
+ */
+ boolean removeEnchant(MCEnchantment ench);
+
+ boolean hasRepairCost();
+
+ int getRepairCost();
+
+ void setRepairCost(int cost);
+
+ boolean isUnbreakable();
+
+ void setUnbreakable(boolean unbreakable);
}
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
index 7a0f41d1d5..1b025a2042 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitConvertor.java
@@ -124,7 +124,18 @@
import org.bukkit.inventory.Recipe;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.inventory.ShapelessRecipe;
-import org.bukkit.inventory.meta.*;
+import org.bukkit.inventory.meta.BannerMeta;
+import org.bukkit.inventory.meta.BlockStateMeta;
+import org.bukkit.inventory.meta.BookMeta;
+import org.bukkit.inventory.meta.EnchantmentStorageMeta;
+import org.bukkit.inventory.meta.FireworkEffectMeta;
+import org.bukkit.inventory.meta.FireworkMeta;
+import org.bukkit.inventory.meta.ItemMeta;
+import org.bukkit.inventory.meta.LeatherArmorMeta;
+import org.bukkit.inventory.meta.MapMeta;
+import org.bukkit.inventory.meta.PotionMeta;
+import org.bukkit.inventory.meta.SkullMeta;
+import org.bukkit.inventory.meta.SpawnEggMeta;
import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.potion.PotionData;
import org.yaml.snakeyaml.Yaml;
@@ -301,32 +312,32 @@ public Object call() throws Exception {
}
}
-// /**
-// * We don't want to allow scripts to clear other plugin's tasks
-// * on accident, so only ids registered through our interface
-// * can also be cancelled.
-// */
-// private static final Set validIDs = new TreeSet();
+// /**
+// * We don't want to allow scripts to clear other plugin's tasks
+// * on accident, so only ids registered through our interface
+// * can also be cancelled.
+// */
+// private static final Set validIDs = new TreeSet();
//
// @Override
-// public synchronized int SetFutureRunnable(DaemonManager dm, long ms, Runnable r) {
-// int id = Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(CommandHelperPlugin.self, r, Static.msToTicks(ms));
-// validIDs.add(id);
-// return id;
-// }
+// public synchronized int SetFutureRunnable(DaemonManager dm, long ms, Runnable r) {
+// int id = Bukkit.getServer().getScheduler().scheduleSyncDelayedTask(CommandHelperPlugin.self, r, Static.msToTicks(ms));
+// validIDs.add(id);
+// return id;
+// }
//
// @Override
-// public synchronized int SetFutureRepeater(DaemonManager dm, long ms, long initialDelay, Runnable r){
-// int id = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(CommandHelperPlugin.self, r, Static.msToTicks(initialDelay), Static.msToTicks(ms));
-// validIDs.add(id);
-// return id;
-// }
+// public synchronized int SetFutureRepeater(DaemonManager dm, long ms, long initialDelay, Runnable r){
+// int id = Bukkit.getServer().getScheduler().scheduleSyncRepeatingTask(CommandHelperPlugin.self, r, Static.msToTicks(initialDelay), Static.msToTicks(ms));
+// validIDs.add(id);
+// return id;
+// }
//
// @Override
-// public synchronized void ClearAllRunnables() {
+// public synchronized void ClearAllRunnables() {
// //Doing cancelTasks apparently does not work, so let's just manually cancel each task, which does appear to work.
// //Anyways, it's better that way anyhow, because we actually remove IDs from validIDs that way.
-// //((BukkitMCServer)Static.getServer()).__Server().getScheduler().cancelTasks(CommandHelperPlugin.self);
+// //((BukkitMCServer)Static.getServer()).__Server().getScheduler().cancelTasks(CommandHelperPlugin.self);
// Set ids = new TreeSet(validIDs);
// for(int id : ids){
// try{
@@ -336,15 +347,15 @@ public Object call() throws Exception {
// Logger.getLogger(BukkitConvertor.class.getName()).log(null, Level.SEVERE, e);
// }
// }
-// }
+// }
//
// @Override
-// public void ClearFutureRunnable(int id) {
-// if(validIDs.contains(id)){
-// Bukkit.getServer().getScheduler().cancelTask(id);
-// validIDs.remove(id);
-// }
-// }
+// public void ClearFutureRunnable(int id) {
+// if(validIDs.contains(id)){
+// Bukkit.getServer().getScheduler().cancelTask(id);
+// validIDs.remove(id);
+// }
+// }
public static MCEntity BukkitGetCorrectEntity(Entity be) {
if(be == null) {
return null;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBeaconInventory.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBeaconInventory.java
index 5e67359454..7725af086c 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBeaconInventory.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBeaconInventory.java
@@ -10,24 +10,24 @@
import com.laytonsmith.abstraction.bukkit.blocks.BukkitMCBeacon;
public class BukkitMCBeaconInventory extends BukkitMCInventory implements MCBeaconInventory {
-
+
private BeaconInventory inv;
-
+
public BukkitMCBeaconInventory(BeaconInventory inv) {
super(inv);
this.inv = inv;
}
-
+
@Override
public MCItemStack getItem() {
return new BukkitMCItemStack(this.inv.getItem());
}
-
+
@Override
public void setItem(MCItemStack stack) {
this.inv.setItem((ItemStack) stack.getHandle());
}
-
+
@Override
public MCBeacon getHolder() {
return new BukkitMCBeacon((Beacon) this.inv.getHolder());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBrewerInventory.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBrewerInventory.java
index 63977d5b2f..afe99c62b5 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBrewerInventory.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCBrewerInventory.java
@@ -10,64 +10,64 @@
import com.laytonsmith.abstraction.bukkit.blocks.BukkitMCBrewingStand;
public class BukkitMCBrewerInventory extends BukkitMCInventory implements MCBrewerInventory {
-
+
private BrewerInventory inv;
-
+
public BukkitMCBrewerInventory(BrewerInventory inv) {
super(inv);
this.inv = inv;
}
-
+
@Override
public MCItemStack getFuel() {
return new BukkitMCItemStack(this.inv.getFuel());
}
-
+
@Override
public MCItemStack getIngredient() {
return new BukkitMCItemStack(this.inv.getIngredient());
}
-
+
@Override
public MCItemStack getLeftBottle() {
return new BukkitMCItemStack(this.inv.getItem(0));
}
-
+
@Override
public MCItemStack getMiddleBottle() {
return new BukkitMCItemStack(this.inv.getItem(1));
}
-
+
@Override
public MCItemStack getRightBottle() {
return new BukkitMCItemStack(this.inv.getItem(2));
}
-
+
@Override
public void setFuel(MCItemStack stack) {
this.inv.setFuel((ItemStack) stack.getHandle());
}
-
+
@Override
public void setIngredient(MCItemStack stack) {
this.inv.setIngredient((ItemStack) stack.getHandle());
}
-
+
@Override
public void setLeftBottle(MCItemStack stack) {
this.inv.setItem(0, (ItemStack) stack.getHandle());
}
-
+
@Override
public void setMiddleBottle(MCItemStack stack) {
this.inv.setItem(1, (ItemStack) stack.getHandle());
}
-
+
@Override
public void setRightBottle(MCItemStack stack) {
this.inv.setItem(2, (ItemStack) stack.getHandle());
}
-
+
@Override
public MCBrewingStand getHolder() {
return new BukkitMCBrewingStand((BrewingStand) this.inv.getHolder());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceInventory.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceInventory.java
index 0d102618a5..59d8dba1de 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceInventory.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCFurnaceInventory.java
@@ -9,44 +9,44 @@
import com.laytonsmith.abstraction.bukkit.blocks.BukkitMCFurnace;
public class BukkitMCFurnaceInventory extends BukkitMCInventory implements MCFurnaceInventory {
-
+
private FurnaceInventory inv;
-
+
public BukkitMCFurnaceInventory(FurnaceInventory inv) {
super(inv);
this.inv = inv;
}
-
+
@Override
public MCItemStack getResult() {
return new BukkitMCItemStack(this.inv.getResult());
}
-
+
@Override
public MCItemStack getFuel() {
return new BukkitMCItemStack(this.inv.getFuel());
}
-
+
@Override
public MCItemStack getSmelting() {
return new BukkitMCItemStack(this.inv.getSmelting());
}
-
+
@Override
public void setFuel(MCItemStack stack) {
this.inv.setFuel((ItemStack) stack.getHandle());
}
-
+
@Override
public void setResult(MCItemStack stack) {
this.inv.setResult((ItemStack) stack.getHandle());
}
-
+
@Override
public void setSmelting(MCItemStack stack) {
this.inv.setSmelting((ItemStack) stack.getHandle());
}
-
+
@Override
public MCFurnace getHolder() {
return new BukkitMCFurnace(this.inv.getHolder());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java
index d955cd63c1..da50ae944e 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCWorld.java
@@ -25,7 +25,27 @@
import com.laytonsmith.abstraction.entities.MCFallingBlock;
import com.laytonsmith.abstraction.entities.MCFirework;
import com.laytonsmith.abstraction.entities.MCHorse;
-import com.laytonsmith.abstraction.enums.*;
+import com.laytonsmith.abstraction.enums.MCBiomeType;
+import com.laytonsmith.abstraction.enums.MCCreeperType;
+import com.laytonsmith.abstraction.enums.MCDifficulty;
+import com.laytonsmith.abstraction.enums.MCDyeColor;
+import com.laytonsmith.abstraction.enums.MCEffect;
+import com.laytonsmith.abstraction.enums.MCEntityType;
+import com.laytonsmith.abstraction.enums.MCGameRule;
+import com.laytonsmith.abstraction.enums.MCMobs;
+import com.laytonsmith.abstraction.enums.MCOcelotType;
+import com.laytonsmith.abstraction.enums.MCParticle;
+import com.laytonsmith.abstraction.enums.MCPigType;
+import com.laytonsmith.abstraction.enums.MCProfession;
+import com.laytonsmith.abstraction.enums.MCSkeletonType;
+import com.laytonsmith.abstraction.enums.MCSound;
+import com.laytonsmith.abstraction.enums.MCSoundCategory;
+import com.laytonsmith.abstraction.enums.MCTreeType;
+import com.laytonsmith.abstraction.enums.MCVersion;
+import com.laytonsmith.abstraction.enums.MCWolfType;
+import com.laytonsmith.abstraction.enums.MCWorldEnvironment;
+import com.laytonsmith.abstraction.enums.MCWorldType;
+import com.laytonsmith.abstraction.enums.MCZombieType;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCBiomeType;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCDifficulty;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCDyeColor;
@@ -51,7 +71,60 @@
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
-import org.bukkit.entity.*;
+import org.bukkit.entity.Bat;
+import org.bukkit.entity.Blaze;
+import org.bukkit.entity.CaveSpider;
+import org.bukkit.entity.Chicken;
+import org.bukkit.entity.Cow;
+import org.bukkit.entity.Creeper;
+import org.bukkit.entity.Donkey;
+import org.bukkit.entity.ElderGuardian;
+import org.bukkit.entity.EnderDragon;
+import org.bukkit.entity.Enderman;
+import org.bukkit.entity.Endermite;
+import org.bukkit.entity.Entity;
+import org.bukkit.entity.EntityType;
+import org.bukkit.entity.Evoker;
+import org.bukkit.entity.Firework;
+import org.bukkit.entity.Ghast;
+import org.bukkit.entity.Giant;
+import org.bukkit.entity.Guardian;
+import org.bukkit.entity.Horse;
+import org.bukkit.entity.Husk;
+import org.bukkit.entity.Illusioner;
+import org.bukkit.entity.IronGolem;
+import org.bukkit.entity.LivingEntity;
+import org.bukkit.entity.Llama;
+import org.bukkit.entity.MagmaCube;
+import org.bukkit.entity.Mule;
+import org.bukkit.entity.MushroomCow;
+import org.bukkit.entity.Ocelot;
+import org.bukkit.entity.Parrot;
+import org.bukkit.entity.Pig;
+import org.bukkit.entity.PigZombie;
+import org.bukkit.entity.Player;
+import org.bukkit.entity.PolarBear;
+import org.bukkit.entity.Rabbit;
+import org.bukkit.entity.Sheep;
+import org.bukkit.entity.Shulker;
+import org.bukkit.entity.Silverfish;
+import org.bukkit.entity.Skeleton;
+import org.bukkit.entity.SkeletonHorse;
+import org.bukkit.entity.Slime;
+import org.bukkit.entity.Snowman;
+import org.bukkit.entity.Spider;
+import org.bukkit.entity.Squid;
+import org.bukkit.entity.Stray;
+import org.bukkit.entity.Vex;
+import org.bukkit.entity.Villager;
+import org.bukkit.entity.Vindicator;
+import org.bukkit.entity.Witch;
+import org.bukkit.entity.Wither;
+import org.bukkit.entity.WitherSkeleton;
+import org.bukkit.entity.Wolf;
+import org.bukkit.entity.Zombie;
+import org.bukkit.entity.ZombieHorse;
+import org.bukkit.entity.ZombieVillager;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.material.MaterialData;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBeacon.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBeacon.java
index bf7a3471b0..e3c19ee8fb 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBeacon.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBeacon.java
@@ -13,19 +13,19 @@
import org.bukkit.entity.LivingEntity;
public class BukkitMCBeacon extends BukkitMCBlockState implements MCBeacon {
-
+
private Beacon beacon;
-
+
public BukkitMCBeacon(Beacon block) {
super(block);
this.beacon = block;
}
-
+
@Override
public MCBeaconInventory getInventory() {
return new BukkitMCBeaconInventory(this.beacon.getInventory());
}
-
+
@Override
public Collection getEntitiesInRange() {
HashSet ret = new HashSet<>();
@@ -34,29 +34,29 @@ public Collection getEntitiesInRange() {
}
return ret;
}
-
+
// @Override
// public MCPotionEffect getPrimaryEffect() {
// // TODO Implement.
// return null;
// }
-//
+//
// @Override
// public MCPotionEffect getSecondaryEffect() {
// // TODO Implement.
// return null;
// }
-
+
@Override
public int getTier() {
return this.beacon.getTier();
}
-
+
// @Override
// public void setPrimaryEffect(MCPotionEffect effect) {
// this.beacon.setPrimaryEffect(effect.getHandle());
// }
-//
+//
// @Override
// public void setSecondaryEffect(MCPotionEffect effect) {
// this.beacon.setSecondaryEffect(effect.getHandle());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBrewingStand.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBrewingStand.java
index 4adee31293..1277067c5e 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBrewingStand.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCBrewingStand.java
@@ -7,34 +7,34 @@
import org.bukkit.block.BrewingStand;
public class BukkitMCBrewingStand extends BukkitMCBlockState implements MCBrewingStand {
-
+
private BrewingStand bs;
-
+
public BukkitMCBrewingStand(BrewingStand block) {
super(block);
this.bs = block;
}
-
+
@Override
public MCBrewerInventory getInventory() {
return new BukkitMCBrewerInventory(this.bs.getInventory());
}
-
+
@Override
public int getBrewingTime() {
return this.bs.getBrewingTime();
}
-
+
@Override
public int getFuelLevel() {
return this.bs.getFuelLevel();
}
-
+
@Override
public void setBrewingTime(int brewTime) {
this.bs.setBrewingTime(brewTime);
}
-
+
@Override
public void setFuelLevel(int level) {
this.bs.setFuelLevel(level);
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCChest.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCChest.java
index 412416dd43..c31445ef1c 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCChest.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCChest.java
@@ -7,14 +7,14 @@
import org.bukkit.block.Chest;
public class BukkitMCChest extends BukkitMCBlockState implements MCChest {
-
+
private Chest chest;
-
+
public BukkitMCChest(Chest block) {
super(block);
this.chest = block;
}
-
+
@Override
public MCInventory getInventory() {
return new BukkitMCInventory(this.chest.getInventory());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCDropper.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCDropper.java
index bdecb7a32e..f658b11453 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCDropper.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCDropper.java
@@ -7,19 +7,19 @@
import org.bukkit.block.Dropper;
public class BukkitMCDropper extends BukkitMCBlockState implements MCDropper {
-
+
private Dropper dropper;
-
+
public BukkitMCDropper(Dropper block) {
super(block);
this.dropper = block;
}
-
+
@Override
public MCInventory getInventory() {
return new BukkitMCInventory(this.dropper.getInventory());
}
-
+
@Override
public void drop() {
this.dropper.drop();
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCFurnace.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCFurnace.java
index 6690e587f0..abeccc8b53 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCFurnace.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCFurnace.java
@@ -7,34 +7,34 @@
import org.bukkit.block.Furnace;
public class BukkitMCFurnace extends BukkitMCBlockState implements MCFurnace {
-
+
private Furnace furnace;
-
+
public BukkitMCFurnace(Furnace block) {
super(block);
this.furnace = block;
}
-
+
@Override
public MCFurnaceInventory getInventory() {
return new BukkitMCFurnaceInventory(this.furnace.getInventory());
}
-
+
@Override
public short getBurnTime() {
return this.furnace.getBurnTime();
}
-
+
@Override
public void setBurnTime(short burnTime) {
this.furnace.setBurnTime(burnTime);
}
-
+
@Override
public short getCookTime() {
return this.furnace.getCookTime();
}
-
+
@Override
public void setCookTime(short cookTime) {
this.furnace.setCookTime(cookTime);
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCHopper.java b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCHopper.java
index 4efcf6f0e6..f063ae9cfa 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCHopper.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/blocks/BukkitMCHopper.java
@@ -7,14 +7,14 @@
import org.bukkit.block.Hopper;
public class BukkitMCHopper extends BukkitMCBlockState implements MCHopper {
-
+
private Hopper hopper;
-
+
public BukkitMCHopper(Hopper block) {
super(block);
this.hopper = block;
}
-
+
@Override
public MCInventory getInventory() {
return new BukkitMCInventory(this.hopper.getInventory());
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java
index c35ccfb235..97618fd48b 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitBlockEvents.java
@@ -22,7 +22,20 @@
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCBlockFace;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCIgniteCause;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCInstrument;
-import com.laytonsmith.abstraction.events.*;
+import com.laytonsmith.abstraction.events.MCBlockBreakEvent;
+import com.laytonsmith.abstraction.events.MCBlockBurnEvent;
+import com.laytonsmith.abstraction.events.MCBlockDispenseEvent;
+import com.laytonsmith.abstraction.events.MCBlockEvent;
+import com.laytonsmith.abstraction.events.MCBlockFadeEvent;
+import com.laytonsmith.abstraction.events.MCBlockFromToEvent;
+import com.laytonsmith.abstraction.events.MCBlockGrowEvent;
+import com.laytonsmith.abstraction.events.MCBlockIgniteEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonExtendEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonRetractEvent;
+import com.laytonsmith.abstraction.events.MCBlockPlaceEvent;
+import com.laytonsmith.abstraction.events.MCNotePlayEvent;
+import com.laytonsmith.abstraction.events.MCSignChangeEvent;
import com.laytonsmith.annotations.abstraction;
import com.laytonsmith.core.constructs.CArray;
import com.laytonsmith.core.constructs.CString;
@@ -30,7 +43,20 @@
import com.laytonsmith.core.exceptions.CRE.CREIllegalArgumentException;
import org.bukkit.Note;
import org.bukkit.block.Block;
-import org.bukkit.event.block.*;
+import org.bukkit.event.block.BlockBreakEvent;
+import org.bukkit.event.block.BlockBurnEvent;
+import org.bukkit.event.block.BlockDispenseEvent;
+import org.bukkit.event.block.BlockEvent;
+import org.bukkit.event.block.BlockFadeEvent;
+import org.bukkit.event.block.BlockFromToEvent;
+import org.bukkit.event.block.BlockGrowEvent;
+import org.bukkit.event.block.BlockIgniteEvent;
+import org.bukkit.event.block.BlockPistonEvent;
+import org.bukkit.event.block.BlockPistonExtendEvent;
+import org.bukkit.event.block.BlockPistonRetractEvent;
+import org.bukkit.event.block.BlockPlaceEvent;
+import org.bukkit.event.block.NotePlayEvent;
+import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.util.Vector;
import java.util.ArrayList;
@@ -237,8 +263,7 @@ public MCBlock getBlock() {
}
@abstraction(type = Implementation.Type.BUKKIT)
- public static class BukkitMCBlockIgniteEvent extends BukkitMCBlockEvent
- implements MCBlockIgniteEvent {
+ public static class BukkitMCBlockIgniteEvent extends BukkitMCBlockEvent implements MCBlockIgniteEvent {
BlockIgniteEvent event;
@@ -403,8 +428,7 @@ public Object _GetObject() {
}
@abstraction(type = Implementation.Type.BUKKIT)
- public static class BukkitMCBlockDispenseEvent extends BukkitMCBlockEvent
- implements MCBlockDispenseEvent {
+ public static class BukkitMCBlockDispenseEvent extends BukkitMCBlockEvent implements MCBlockDispenseEvent {
BlockDispenseEvent bde;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
index 340aa88f7b..e6caf082c8 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitPlayerEvents.java
@@ -34,7 +34,32 @@
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCFishingState;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCGameMode;
import com.laytonsmith.abstraction.enums.bukkit.BukkitMCTeleportCause;
-import com.laytonsmith.abstraction.events.*;
+import com.laytonsmith.abstraction.events.MCChatTabCompleteEvent;
+import com.laytonsmith.abstraction.events.MCExpChangeEvent;
+import com.laytonsmith.abstraction.events.MCFoodLevelChangeEvent;
+import com.laytonsmith.abstraction.events.MCGamemodeChangeEvent;
+import com.laytonsmith.abstraction.events.MCPlayerBedEvent;
+import com.laytonsmith.abstraction.events.MCPlayerChatEvent;
+import com.laytonsmith.abstraction.events.MCPlayerCommandEvent;
+import com.laytonsmith.abstraction.events.MCPlayerDeathEvent;
+import com.laytonsmith.abstraction.events.MCPlayerEditBookEvent;
+import com.laytonsmith.abstraction.events.MCPlayerEvent;
+import com.laytonsmith.abstraction.events.MCPlayerFishEvent;
+import com.laytonsmith.abstraction.events.MCPlayerInteractEvent;
+import com.laytonsmith.abstraction.events.MCPlayerItemConsumeEvent;
+import com.laytonsmith.abstraction.events.MCPlayerJoinEvent;
+import com.laytonsmith.abstraction.events.MCPlayerKickEvent;
+import com.laytonsmith.abstraction.events.MCPlayerLoginEvent;
+import com.laytonsmith.abstraction.events.MCPlayerMoveEvent;
+import com.laytonsmith.abstraction.events.MCPlayerPortalEvent;
+import com.laytonsmith.abstraction.events.MCPlayerPreLoginEvent;
+import com.laytonsmith.abstraction.events.MCPlayerQuitEvent;
+import com.laytonsmith.abstraction.events.MCPlayerRespawnEvent;
+import com.laytonsmith.abstraction.events.MCPlayerTeleportEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleFlightEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleSneakEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleSprintEvent;
+import com.laytonsmith.abstraction.events.MCWorldChangedEvent;
import com.laytonsmith.annotations.abstraction;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -45,8 +70,31 @@
import org.bukkit.event.Event;
import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
-import org.bukkit.event.player.*;
-import org.bukkit.event.player.PlayerPreLoginEvent.Result;
+import org.bukkit.event.player.AsyncPlayerChatEvent;
+import org.bukkit.event.player.PlayerBedEnterEvent;
+import org.bukkit.event.player.PlayerBedLeaveEvent;
+import org.bukkit.event.player.PlayerChangedWorldEvent;
+import org.bukkit.event.player.PlayerChatTabCompleteEvent;
+import org.bukkit.event.player.PlayerCommandPreprocessEvent;
+import org.bukkit.event.player.PlayerEditBookEvent;
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.event.player.PlayerExpChangeEvent;
+import org.bukkit.event.player.PlayerFishEvent;
+import org.bukkit.event.player.PlayerGameModeChangeEvent;
+import org.bukkit.event.player.PlayerInteractEvent;
+import org.bukkit.event.player.PlayerItemConsumeEvent;
+import org.bukkit.event.player.PlayerJoinEvent;
+import org.bukkit.event.player.PlayerKickEvent;
+import org.bukkit.event.player.PlayerLoginEvent;
+import org.bukkit.event.player.PlayerMoveEvent;
+import org.bukkit.event.player.PlayerPortalEvent;
+import org.bukkit.event.player.PlayerPreLoginEvent;
+import org.bukkit.event.player.PlayerQuitEvent;
+import org.bukkit.event.player.PlayerRespawnEvent;
+import org.bukkit.event.player.PlayerTeleportEvent;
+import org.bukkit.event.player.PlayerToggleFlightEvent;
+import org.bukkit.event.player.PlayerToggleSneakEvent;
+import org.bukkit.event.player.PlayerToggleSprintEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
@@ -389,7 +437,7 @@ public String getResult() {
@Override
public void setResult(String rst) {
- event.setResult(Result.valueOf(rst.toUpperCase()));
+ event.setResult(PlayerPreLoginEvent.Result.valueOf(rst.toUpperCase()));
}
@Override
@@ -400,8 +448,7 @@ public String getIP() {
}
@abstraction(type = Implementation.Type.BUKKIT)
- public static class BukkitMCPlayerChatEvent extends BukkitMCPlayerEvent
- implements MCPlayerChatEvent {
+ public static class BukkitMCPlayerChatEvent extends BukkitMCPlayerEvent implements MCPlayerChatEvent {
AsyncPlayerChatEvent pce;
@@ -743,8 +790,7 @@ public static BukkitMCWorldChangedEvent _instantiate(MCPlayer entity, MCWorld fr
}
}
- public static class BukkitMCPlayerFishEvent extends BukkitMCPlayerEvent
- implements MCPlayerFishEvent {
+ public static class BukkitMCPlayerFishEvent extends BukkitMCPlayerEvent implements MCPlayerFishEvent {
PlayerFishEvent e;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitServerEvents.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitServerEvents.java
index b1a3be452c..17e8f49cd6 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitServerEvents.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/BukkitServerEvents.java
@@ -137,7 +137,7 @@ public static class BukkitMCBroadcastMessageEvent implements MCBroadcastMessageE
public BukkitMCBroadcastMessageEvent(Event event) {
this.bme = (BroadcastMessageEvent) event;
}
-
+
@Override
public Object _GetObject() {
return this.bme;
@@ -196,6 +196,6 @@ public Set getPlayerRecipients() {
public boolean isCancelled() {
return this.bme.isCancelled();
}
-
+
}
}
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java
index d20da46169..024b313c01 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitBlockListener.java
@@ -14,7 +14,18 @@
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
-import org.bukkit.event.block.*;
+import org.bukkit.event.block.BlockBreakEvent;
+import org.bukkit.event.block.BlockBurnEvent;
+import org.bukkit.event.block.BlockDispenseEvent;
+import org.bukkit.event.block.BlockFadeEvent;
+import org.bukkit.event.block.BlockFromToEvent;
+import org.bukkit.event.block.BlockGrowEvent;
+import org.bukkit.event.block.BlockIgniteEvent;
+import org.bukkit.event.block.BlockPistonExtendEvent;
+import org.bukkit.event.block.BlockPistonRetractEvent;
+import org.bukkit.event.block.BlockPlaceEvent;
+import org.bukkit.event.block.NotePlayEvent;
+import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginManager;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java
index 6165fd0588..86d6a0e4dc 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitEntityListener.java
@@ -2,7 +2,28 @@
import com.laytonsmith.abstraction.MCEntity;
import com.laytonsmith.abstraction.MCPlayer;
-import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.*;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCCreatureSpawnEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityChangeBlockEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityDamageEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityDamageByEntityEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityDeathEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityEnterPortalEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityExplodeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityInteractEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityPortalEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityRegainHealthEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCEntityToggleGlideEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCFireworkExplodeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCHangingBreakEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCItemDespawnEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCItemSpawnEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCPlayerDropItemEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCPlayerInteractAtEntityEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCPlayerInteractEntityEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCPlayerPickupItemEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCProjectileHitEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCProjectileLaunchEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitEntityEvents.BukkitMCTargetEvent;
import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents;
import com.laytonsmith.annotations.EventIdentifier;
import com.laytonsmith.core.events.Driver;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java
index a90aa676bd..9a7431eaca 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitPlayerListener.java
@@ -2,7 +2,29 @@
import com.laytonsmith.abstraction.MCLocation;
import com.laytonsmith.abstraction.bukkit.BukkitMCLocation;
-import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.*;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCChatTabCompleteEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCExpChangeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCFoodLevelChangeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCGamemodeChangeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerBedEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerChatEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerEditBookEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerFishEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerInteractEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerItemConsumeEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerJoinEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerKickEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerLoginEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerMoveEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerPortalEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerPreLoginEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerQuitEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerRespawnEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerTeleportEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerToggleFlightEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerToggleSneakEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCPlayerToggleSprintEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitPlayerEvents.BukkitMCWorldChangedEvent;
import com.laytonsmith.commandhelper.CommandHelperPlugin;
import com.laytonsmith.core.events.Driver;
import com.laytonsmith.core.events.EventUtils;
@@ -14,7 +36,29 @@
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.FoodLevelChangeEvent;
-import org.bukkit.event.player.*;
+import org.bukkit.event.player.AsyncPlayerChatEvent;
+import org.bukkit.event.player.PlayerBedEnterEvent;
+import org.bukkit.event.player.PlayerBedLeaveEvent;
+import org.bukkit.event.player.PlayerChangedWorldEvent;
+import org.bukkit.event.player.PlayerChatTabCompleteEvent;
+import org.bukkit.event.player.PlayerEditBookEvent;
+import org.bukkit.event.player.PlayerExpChangeEvent;
+import org.bukkit.event.player.PlayerFishEvent;
+import org.bukkit.event.player.PlayerGameModeChangeEvent;
+import org.bukkit.event.player.PlayerInteractEvent;
+import org.bukkit.event.player.PlayerItemConsumeEvent;
+import org.bukkit.event.player.PlayerJoinEvent;
+import org.bukkit.event.player.PlayerKickEvent;
+import org.bukkit.event.player.PlayerLoginEvent;
+import org.bukkit.event.player.PlayerMoveEvent;
+import org.bukkit.event.player.PlayerPortalEvent;
+import org.bukkit.event.player.PlayerPreLoginEvent;
+import org.bukkit.event.player.PlayerQuitEvent;
+import org.bukkit.event.player.PlayerRespawnEvent;
+import org.bukkit.event.player.PlayerTeleportEvent;
+import org.bukkit.event.player.PlayerToggleFlightEvent;
+import org.bukkit.event.player.PlayerToggleSneakEvent;
+import org.bukkit.event.player.PlayerToggleSprintEvent;
import java.util.Map;
import java.util.concurrent.Callable;
@@ -110,7 +154,7 @@ public void onPlayerChat(final AsyncPlayerChatEvent event) {
//lot that can be done reasonably.
// SortedSet events = EventUtils.GetEvents(Driver.PLAYER_CHAT);
-// Event driver = EventList.getEvent(Driver.PLAYER_CHAT, "player_chat");
+// Event driver = EventList.getEvent(Driver.PLAYER_CHAT, "player_chat");
// //Unfortunately, due to priority issues, if any event is syncronous, all of them
// //have to be synchronous.
// boolean canBeAsync = true;
@@ -127,7 +171,7 @@ public void onPlayerChat(final AsyncPlayerChatEvent event) {
// if(f.runAsync() != null && f.runAsync() == false){
// //Nope, can't be run async :(
// canBeAsync = false;
-// }
+// }
// }
// try {
// if(driver.matches(b.getPrefilter(), new BukkitPlayerEvents.BukkitMCPlayerChatEvent(event))){
@@ -138,7 +182,7 @@ public void onPlayerChat(final AsyncPlayerChatEvent event) {
// //No need to fire this one
// }
// }
-//
+//
// if(!actuallyNeedToFire){
// //Yay! Prefilters finally actually optimized something!
// return;
diff --git a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitVehicleListener.java b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitVehicleListener.java
index 9aeb02dd5a..b6cd950707 100644
--- a/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitVehicleListener.java
+++ b/src/main/java/com/laytonsmith/abstraction/bukkit/events/drivers/BukkitVehicleListener.java
@@ -2,7 +2,12 @@
import com.laytonsmith.abstraction.MCLocation;
import com.laytonsmith.abstraction.bukkit.BukkitMCLocation;
-import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.*;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleBlockCollideEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleDestroyEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleEnterEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleEntityCollideEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleExitEvent;
+import com.laytonsmith.abstraction.bukkit.events.BukkitVehicleEvents.BukkitMCVehicleMoveEvent;
import com.laytonsmith.core.events.Driver;
import com.laytonsmith.core.events.EventUtils;
import com.laytonsmith.core.events.drivers.VehicleEvents;
diff --git a/src/main/java/com/laytonsmith/commandhelper/BukkitDirtyRegisteredListener.java b/src/main/java/com/laytonsmith/commandhelper/BukkitDirtyRegisteredListener.java
index 21505e9468..4a3e3861c7 100644
--- a/src/main/java/com/laytonsmith/commandhelper/BukkitDirtyRegisteredListener.java
+++ b/src/main/java/com/laytonsmith/commandhelper/BukkitDirtyRegisteredListener.java
@@ -101,64 +101,64 @@ public static void Repopulate() throws NoSuchFieldException, ClassCastException,
+ " to get rid of this message.", false);
//Go through the list of registered listeners, and inject our
//our own poisoned DirtyRegisteredListeners in instead
-// SimplePluginManager pm = (SimplePluginManager) AliasCore.parent.getServer().getPluginManager();
-// Field fListener = SimplePluginManager.class.getDeclaredField("listeners");
-// //set it to public
-// fListener.setAccessible(true);
-// EnumMap> listeners =
-// (EnumMap>) fListener.get(pm);
+// SimplePluginManager pm = (SimplePluginManager) AliasCore.parent.getServer().getPluginManager();
+// Field fListener = SimplePluginManager.class.getDeclaredField("listeners");
+// //set it to public
+// fListener.setAccessible(true);
+// EnumMap> listeners =
+// (EnumMap>) fListener.get(pm);
//
-// if (listeners instanceof DirtyEnumMap) {
-// return; //We don't need to bother with it, we've already injected our poisoned EnumMap,
-// //so further additions will go through that instead.
-// }
-//
-// //Remove final from the listeners, so we can modify it
-// Field modifiersField = Field.class.getDeclaredField("modifiers");
-// modifiersField.setAccessible(true);
-// modifiersField.setInt(fListener, fListener.getModifiers() & ~Modifier.FINAL);
+// if (listeners instanceof DirtyEnumMap) {
+// return; //We don't need to bother with it, we've already injected our poisoned EnumMap,
+// //so further additions will go through that instead.
+// }
//
-// Map> newListeners = new DirtyEnumMap>(Event.Type.class);
+// //Remove final from the listeners, so we can modify it
+// Field modifiersField = Field.class.getDeclaredField("modifiers");
+// modifiersField.setAccessible(true);
+// modifiersField.setInt(fListener, fListener.getModifiers() & ~Modifier.FINAL);
//
-// //We need the comparator, so we can create a new listener map
-// Field fComparator = SimplePluginManager.class.getDeclaredField("comparer");
-// fComparator.setAccessible(true);
-// Comparator comparator = (Comparator) fComparator.get(pm);
+// Map> newListeners = new DirtyEnumMap>(Event.Type.class);
//
-// //Ok, now we have the listeners, so lets loop through them, and shove them into our own newListener object, so that
-// //we can replace the reference later, without modifying the existing variable, because it is currently being walked
-// //through elsewhere in the code.
+// //We need the comparator, so we can create a new listener map
+// Field fComparator = SimplePluginManager.class.getDeclaredField("comparer");
+// fComparator.setAccessible(true);
+// Comparator comparator = (Comparator) fComparator.get(pm);
//
-// boolean doReplace = false;
+// //Ok, now we have the listeners, so lets loop through them, and shove them into our own newListener object, so that
+// //we can replace the reference later, without modifying the existing variable, because it is currently being walked
+// //through elsewhere in the code.
//
-// Set>> entrySet = listeners.entrySet();
-// Iterator i = entrySet.iterator();
-// while (i.hasNext()) {
-// final Map.Entry> mySet = (Map.Entry>) i.next();
-// Iterator k = mySet.getValue().iterator();
-// SortedSet rls = new DirtyTreeSet(comparator);
-// newListeners.put(mySet.getKey(), rls);
-// while (k.hasNext()) {
-// final RegisteredListener rl = (RegisteredListener) k.next();
-// if (!(rl instanceof BukkitDirtyRegisteredListener)) {
-// doReplace = true;
-// }
-// rls.add(BukkitDirtyRegisteredListener.Generate(rl));
-// }
-// }
+// boolean doReplace = false;
//
-// if (doReplace) {
-// //Only replace it if we've made changes
-// fListener.set(pm, newListeners);
-// }
+// Set>> entrySet = listeners.entrySet();
+// Iterator i = entrySet.iterator();
+// while (i.hasNext()) {
+// final Map.Entry> mySet = (Map.Entry>) i.next();
+// Iterator k = mySet.getValue().iterator();
+// SortedSet rls = new DirtyTreeSet(comparator);
+// newListeners.put(mySet.getKey(), rls);
+// while (k.hasNext()) {
+// final RegisteredListener rl = (RegisteredListener) k.next();
+// if (!(rl instanceof BukkitDirtyRegisteredListener)) {
+// doReplace = true;
+// }
+// rls.add(BukkitDirtyRegisteredListener.Generate(rl));
+// }
+// }
+//
+// if (doReplace) {
+// //Only replace it if we've made changes
+// fListener.set(pm, newListeners);
+// }
}
-// public static class MyEntry {
+// public static class MyEntry {
//
-// public Type key;
-// public DirtyRegisteredListener value;
-// }
+// public Type key;
+// public DirtyRegisteredListener value;
+// }
public static void setCancelled(Event superCancelledEvent) {
if(cancelledEvents.size() >= queueCapacity) {
cancelledEvents.poll();
@@ -201,105 +201,105 @@ public static BukkitDirtyRegisteredListener Generate(RegisteredListener real) th
*/
@Override
public void callEvent(Event event) {
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)) {
-// Debug.DoLog(event.getType(), 1, "Bukkit Event received: " + event.getType().name());
-// }
-// //If it isn't super cancelled, call it, even if it is cancelled
-// if (!BukkitDirtyRegisteredListener.cancelledEvents.contains(event)) {
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
-// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
-// Debug.DoLog(event.getType(), 3, "\tEvent is not super cancelled, so triggering now");
-// }
-// callEvent0(event);
-// } else {
-// //If it's a cancellable event, and this listener isn't Monitor priority, just return
-// if (event instanceof Cancellable && this.priority != EventPriority.MONITOR) {
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
-// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
-// Debug.DoLog(event.getType(), 3, "\tEvent is being ignored, due to play-dirty mode rules");
-// }
-// return;
-// } else {
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
-// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
-// Debug.DoLog(event.getType(), 3, "\tEvent is super cancelled, but this listener is either monitor priority (Y/N:"
-// + (this.priority == EventPriority.MONITOR ? "y" : "n") + " or it it is not cancellable (Y/N:"
-// + (event instanceof Cancellable ? "n" : "y"));
-// }
-// callEvent0(event);
-// }
-// }
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)) {
+// Debug.DoLog(event.getType(), 1, "Bukkit Event received: " + event.getType().name());
+// }
+// //If it isn't super cancelled, call it, even if it is cancelled
+// if (!BukkitDirtyRegisteredListener.cancelledEvents.contains(event)) {
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
+// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
+// Debug.DoLog(event.getType(), 3, "\tEvent is not super cancelled, so triggering now");
+// }
+// callEvent0(event);
+// } else {
+// //If it's a cancellable event, and this listener isn't Monitor priority, just return
+// if (event instanceof Cancellable && this.priority != EventPriority.MONITOR) {
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
+// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
+// Debug.DoLog(event.getType(), 3, "\tEvent is being ignored, due to play-dirty mode rules");
+// }
+// return;
+// } else {
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
+// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
+// Debug.DoLog(event.getType(), 3, "\tEvent is super cancelled, but this listener is either monitor priority (Y/N:"
+// + (this.priority == EventPriority.MONITOR ? "y" : "n") + " or it it is not cancellable (Y/N:"
+// + (event instanceof Cancellable ? "n" : "y"));
+// }
+// callEvent0(event);
+// }
+// }
}
private void callEvent0(Event event) {
-// StopWatch stopWatch = null;
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
-// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
-// if (Debug.EVENT_LOGGING_LEVEL >= 1) {
-// Debug.DoLog(event.getType(), 1, "\tEvent type: " + event.getType().name());
-// Debug.DoLog(event.getType(), 1, "\tCalled from plugin: " + this.plugin.getClass().getSimpleName());
-// }
-// if (Debug.EVENT_LOGGING_LEVEL >= 2) {
-// Debug.DoLog(event.getType(), 1, "\tListener Registered: " + this.listener.getClass().getCanonicalName());
-// Debug.DoLog(event.getType(), 2, "\tIs Cancellable? " + (event instanceof Cancellable ? "Y" : "N"));
-// if (event instanceof Cancellable) {
-// Debug.DoLog(event.getType(), 2, "\t\tIs Cancelled? " + (((Cancellable) event).isCancelled() ? "Y" : "N"));
-// }
-// }
-// if (Debug.EVENT_LOGGING_LEVEL >= 3) {
-// Debug.DoLog(event.getType(), 3, "\tEvent class: " + event.getClass().getCanonicalName());
-// }
-// if (Debug.EVENT_LOGGING_LEVEL >= 4) {
-// //Let's just dump the fields
-// StringBuilder b = new StringBuilder("\n\tFields in this event:\n");
-// for (Field f : event.getClass().getSuperclass().getDeclaredFields()) {
-// b.append("\t\t").append(f.getType().getSimpleName()).append(" ").append(f.getName());
-// f.setAccessible(true);
-// try {
-// Object o = f.get(event);
-// b.append(" = (actual type: ").append(o.getClass().getSimpleName()).append(") ").append(o.toString()).append("\n");
-// } catch (IllegalArgumentException ex) {
-// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, null, ex);
-// } catch (IllegalAccessException ex) {
-// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, null, ex);
-// }
-// }
-// Debug.DoLog(event.getType(), 4, b.toString());
-// }
-// if (Debug.EVENT_LOGGING_LEVEL == 5) {
-// //dump ALL the things
-// StringBuilder b = new StringBuilder("\n\tMethods in this event:\n");
-// for (Method m : event.getClass().getSuperclass().getDeclaredMethods()) {
-// b.append("\t\t").append(m.getReturnType().getSimpleName()).append(" ").append(m.getName()).append("(").append(Static.strJoin(m.getParameterTypes(), ", ")).append(");\n");
-// }
-// Debug.DoLog(event.getType(), 5, b.toString());
-// }
-// }
-// if ((Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
-// && Debug.EVENT_LOGGING_FILTER.contains(event.getType()) && Debug.EVENT_LOGGING_LEVEL >= 2) || Performance.PERFORMANCE_LOGGING) {
-// stopWatch = new StopWatch(
-// this.plugin.getClass().getSimpleName() + "."//Plugin name
-// + this.listener.getClass().getCanonicalName().replaceAll("\\.", "/") + "." //File event is being called from
-// + (event.getType() == Event.Type.CUSTOM_EVENT ? "CUSTOM_EVENT/" + event.getEventName() : event.getType().name()) //Event name
-// );
-// }
-// try{
-// executor.execute(listener, event);
-// } catch(EventException e){
-// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, e.getMessage(), e);
-// }
-// if (stopWatch != null) {
-// stopWatch.stop();
-// if (Debug.EVENT_LOGGING) {
-// Debug.DoLog(event.getType(), 2, "\t\t\tEvent completed in " + stopWatch.getElapsedTime() + " milliseconds");
-// }
-// if (Performance.PERFORMANCE_LOGGING) {
-// Performance.DoLog(stopWatch);
-// }
-// }
-// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)) {
-// Debug.DoLog(event.getType(), 1, "--------------------------------------------------------------\n");
-// }
+// StopWatch stopWatch = null;
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
+// && Debug.EVENT_LOGGING_FILTER.contains(event.getType())) {
+// if (Debug.EVENT_LOGGING_LEVEL >= 1) {
+// Debug.DoLog(event.getType(), 1, "\tEvent type: " + event.getType().name());
+// Debug.DoLog(event.getType(), 1, "\tCalled from plugin: " + this.plugin.getClass().getSimpleName());
+// }
+// if (Debug.EVENT_LOGGING_LEVEL >= 2) {
+// Debug.DoLog(event.getType(), 1, "\tListener Registered: " + this.listener.getClass().getCanonicalName());
+// Debug.DoLog(event.getType(), 2, "\tIs Cancellable? " + (event instanceof Cancellable ? "Y" : "N"));
+// if (event instanceof Cancellable) {
+// Debug.DoLog(event.getType(), 2, "\t\tIs Cancelled? " + (((Cancellable) event).isCancelled() ? "Y" : "N"));
+// }
+// }
+// if (Debug.EVENT_LOGGING_LEVEL >= 3) {
+// Debug.DoLog(event.getType(), 3, "\tEvent class: " + event.getClass().getCanonicalName());
+// }
+// if (Debug.EVENT_LOGGING_LEVEL >= 4) {
+// //Let's just dump the fields
+// StringBuilder b = new StringBuilder("\n\tFields in this event:\n");
+// for (Field f : event.getClass().getSuperclass().getDeclaredFields()) {
+// b.append("\t\t").append(f.getType().getSimpleName()).append(" ").append(f.getName());
+// f.setAccessible(true);
+// try {
+// Object o = f.get(event);
+// b.append(" = (actual type: ").append(o.getClass().getSimpleName()).append(") ").append(o.toString()).append("\n");
+// } catch (IllegalArgumentException ex) {
+// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, null, ex);
+// } catch (IllegalAccessException ex) {
+// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, null, ex);
+// }
+// }
+// Debug.DoLog(event.getType(), 4, b.toString());
+// }
+// if (Debug.EVENT_LOGGING_LEVEL == 5) {
+// //dump ALL the things
+// StringBuilder b = new StringBuilder("\n\tMethods in this event:\n");
+// for (Method m : event.getClass().getSuperclass().getDeclaredMethods()) {
+// b.append("\t\t").append(m.getReturnType().getSimpleName()).append(" ").append(m.getName()).append("(").append(Static.strJoin(m.getParameterTypes(), ", ")).append(");\n");
+// }
+// Debug.DoLog(event.getType(), 5, b.toString());
+// }
+// }
+// if ((Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)
+// && Debug.EVENT_LOGGING_FILTER.contains(event.getType()) && Debug.EVENT_LOGGING_LEVEL >= 2) || Performance.PERFORMANCE_LOGGING) {
+// stopWatch = new StopWatch(
+// this.plugin.getClass().getSimpleName() + "."//Plugin name
+// + this.listener.getClass().getCanonicalName().replaceAll("\\.", "/") + "." //File event is being called from
+// + (event.getType() == Event.Type.CUSTOM_EVENT ? "CUSTOM_EVENT/" + event.getEventName() : event.getType().name()) //Event name
+// );
+// }
+// try{
+// executor.execute(listener, event);
+// } catch(EventException e){
+// Logger.getLogger(BukkitDirtyRegisteredListener.class.getName()).log(Level.SEVERE, e.getMessage(), e);
+// }
+// if (stopWatch != null) {
+// stopWatch.stop();
+// if (Debug.EVENT_LOGGING) {
+// Debug.DoLog(event.getType(), 2, "\t\t\tEvent completed in " + stopWatch.getElapsedTime() + " milliseconds");
+// }
+// if (Performance.PERFORMANCE_LOGGING) {
+// Performance.DoLog(stopWatch);
+// }
+// }
+// if (Debug.EVENT_LOGGING && Debug.IsFiltered(plugin)) {
+// Debug.DoLog(event.getType(), 1, "--------------------------------------------------------------\n");
+// }
}
/**
diff --git a/src/main/java/com/laytonsmith/core/ArgumentValidation.java b/src/main/java/com/laytonsmith/core/ArgumentValidation.java
index be123decef..fc3dc106b8 100644
--- a/src/main/java/com/laytonsmith/core/ArgumentValidation.java
+++ b/src/main/java/com/laytonsmith/core/ArgumentValidation.java
@@ -1,10 +1,22 @@
package com.laytonsmith.core;
import com.laytonsmith.annotations.typeof;
-import com.laytonsmith.core.constructs.*;
import com.laytonsmith.core.exceptions.CRE.CRECastException;
import com.laytonsmith.core.exceptions.CRE.CREFormatException;
import com.laytonsmith.core.exceptions.CRE.CRERangeException;
+import com.laytonsmith.core.constructs.CArray;
+import com.laytonsmith.core.constructs.CBoolean;
+import com.laytonsmith.core.constructs.CByteArray;
+import com.laytonsmith.core.constructs.CClassType;
+import com.laytonsmith.core.constructs.CDecimal;
+import com.laytonsmith.core.constructs.CDouble;
+import com.laytonsmith.core.constructs.CInt;
+import com.laytonsmith.core.constructs.CMutablePrimitive;
+import com.laytonsmith.core.constructs.CNull;
+import com.laytonsmith.core.constructs.CNumber;
+import com.laytonsmith.core.constructs.CString;
+import com.laytonsmith.core.constructs.Construct;
+import com.laytonsmith.core.constructs.Target;
import com.laytonsmith.core.exceptions.ConfigRuntimeException;
import com.laytonsmith.core.natives.interfaces.ArrayAccess;
diff --git a/src/main/java/com/laytonsmith/core/CHLog.java b/src/main/java/com/laytonsmith/core/CHLog.java
index 24b71ba7fc..42d643dcf7 100644
--- a/src/main/java/com/laytonsmith/core/CHLog.java
+++ b/src/main/java/com/laytonsmith/core/CHLog.java
@@ -47,7 +47,7 @@ private CHLog() {
public enum Tags {
COMPILER("compiler", "Logs compiler errors (but not runtime errors)", LogLevel.WARNING),
RUNTIME("runtime", "Logs runtime errors, (exceptions that bubble all the way to the top)", LogLevel.ERROR),
- FALSESTRING("falsestring", "Logs coersion of the string \"false\" to boolean, which is actually true",
+ FALSESTRING("falsestring", "Logs coersion of the string \"false\" to boolean, which is actually true",
LogLevel.ERROR),
DEPRECATION("deprecation", "Shows deprecation warnings", LogLevel.WARNING),
PERSISTENCE("persistence", "Logs when any persistence actions occur.", LogLevel.ERROR),
diff --git a/src/main/java/com/laytonsmith/core/CoreProfile.java b/src/main/java/com/laytonsmith/core/CoreProfile.java
index e8a4c9a58b..2db23aa779 100644
--- a/src/main/java/com/laytonsmith/core/CoreProfile.java
+++ b/src/main/java/com/laytonsmith/core/CoreProfile.java
@@ -20,16 +20,16 @@ public static void main(String[] args) {
StreamUtils.GetSystemOut().println(finish - start + "ms");
/*
- Equivalent mscript:
-
- @start = time()
- @array = array()
- for(1..1000000, @i,
- @array[] = @i
- sys_out(@i)
- )
- @finish = time()
- sys_out(@finish - @start . 'ms')
+ * Equivalent mscript:
+ *
+ * @start = time()
+ * @array = array()
+ * for(1..1000000, @i,
+ * @array[] = @i
+ * sys_out(@i)
+ * )
+ * @finish = time()
+ * sys_out(@finish - @start . 'ms')
*/
}
diff --git a/src/main/java/com/laytonsmith/core/GenericTree.java b/src/main/java/com/laytonsmith/core/GenericTree.java
index 037cf6f4cb..206228d9ad 100644
--- a/src/main/java/com/laytonsmith/core/GenericTree.java
+++ b/src/main/java/com/laytonsmith/core/GenericTree.java
@@ -1,6 +1,6 @@
/*
- Copyright 2010 Vivin Suresh Paliath
- Distributed under the BSD License
+ * Copyright 2010 Vivin Suresh Paliath
+ * Distributed under the BSD License
*/
package com.laytonsmith.core;
@@ -159,7 +159,7 @@ private void buildPostOrderWithDepth(GenericTreeNode node, Map 0) {
token_list.add(new Token(TType.UNKNOWN, buf.toString(), target));
buf = new StringBuilder();
@@ -801,7 +801,7 @@ public static TokenStream lex(String script, File file, boolean inPureMScript, b
if(it.hasPrevious() && t.type == TType.UNKNOWN) {
Token prev1 = it.previous(); // Select 'prev1' <--.
if(prev1.type.isPlusMinus()) {
-
+
// Find the first non-whitespace token before the '-'.
Token prevNonWhitespace = null;
while(it.hasPrevious()) {
@@ -812,9 +812,9 @@ public static TokenStream lex(String script, File file, boolean inPureMScript, b
}
while(it.next() != prev1) { // Skip until selection is at 'prev1 -->'.
}
-
+
if(prevNonWhitespace != null) {
- // Convert "±UNKNOWN" if the '±' is used as a sign (and not an add/subtract operation).
+ // Convert "±UNKNOWN" if the '±' is used as a sign (and not an add/subtract operation).
if(!prevNonWhitespace.type.isIdentifier() // Don't convert "number/string/var ± ...".
&& prevNonWhitespace.type != TType.FUNC_END // Don't convert "func() ± ...".
&& prevNonWhitespace.type != TType.RSQUARE_BRACKET // Don't convert "] ± ..." (arrays).
diff --git a/src/main/java/com/laytonsmith/core/ParseTree.java b/src/main/java/com/laytonsmith/core/ParseTree.java
index 609298b8c9..34fa892781 100644
--- a/src/main/java/com/laytonsmith/core/ParseTree.java
+++ b/src/main/java/com/laytonsmith/core/ParseTree.java
@@ -244,7 +244,7 @@ public boolean isDynamic() {
// * If ANY data node REQUIRES this to be async, this will return true. If
// * NONE of the data nodes REQUIRE this to be async, or if NONE of them care,
// * it returns false.
-// * @return
+// * @return
// */
// public boolean isAsync(){
// if(isCached(this, CacheTypes.IS_ASYNC)){
@@ -256,19 +256,19 @@ public boolean isDynamic() {
// if(runAsync != null && runAsync == true){
// //We're done here. It's definitely async only,
// //so we can stop looking.
-// ret = true;
+// ret = true;
// }
// }
// setCache(this, CacheTypes.IS_ASYNC, ret);
// return ret;
-// }
+// }
// }
-//
+//
// /**
// * If ANY data node REQUIRES this to be sync, this will return true. If
// * NONE of the data nodes REQUIRE this to be sync, or if NONE of them care,
// * it returns false.
-// * @return
+// * @return
// */
// public boolean isSync(){
// if(isCached(this, CacheTypes.IS_SYNC)){
diff --git a/src/main/java/com/laytonsmith/core/Static.java b/src/main/java/com/laytonsmith/core/Static.java
index 47611f3816..e744fc292c 100644
--- a/src/main/java/com/laytonsmith/core/Static.java
+++ b/src/main/java/com/laytonsmith/core/Static.java
@@ -244,7 +244,7 @@ public static byte getInt8(Construct c, Target t) {
public static boolean getBoolean(Construct c, Target t) {
return ArgumentValidation.getBoolean(c, t);
}
-
+
/**
* Returns a boolean from any given construct. Depending on the type of the construct being converted, it follows
* the following rules: If it is an integer or a double, it is false if 0, true otherwise. If it is a string, if it
@@ -252,7 +252,7 @@ public static boolean getBoolean(Construct c, Target t) {
*
* @param c
* @return
- * @deprecated Use
+ * @deprecated Use
* {@link #getBoolean(com.laytonsmith.core.constructs.Construct, com.laytonsmith.core.constructs.Target)}
* instead, as it provides better error messages for users that use the string "false" as a boolean. This method
* should be removed in version 3.3.3 or above.
diff --git a/src/main/java/com/laytonsmith/core/compiler/FileOptions.java b/src/main/java/com/laytonsmith/core/compiler/FileOptions.java
index bb43e32ebd..c275a3459a 100644
--- a/src/main/java/com/laytonsmith/core/compiler/FileOptions.java
+++ b/src/main/java/com/laytonsmith/core/compiler/FileOptions.java
@@ -19,7 +19,7 @@
public class FileOptions {
/*
- These value names are used in the syntax highlighter, and should remain the name they are in code.
+ * These value names are used in the syntax highlighter, and should remain the name they are in code.
*/
private final Boolean strict;
private final Set suppressWarnings;
@@ -62,7 +62,7 @@ private List parseList(String list) {
}
return l;
}
-
+
private > Set parseEnumSet(String list, Class type) {
EnumSet set = EnumSet.noneOf(type);
List sList = parseList(list);
@@ -122,19 +122,19 @@ public String toString() {
+ (description == null ? "" : "File description: " + description + "\n");
}
-
+
public static enum SuppressWarnings implements Documentation {
// In the future, when some are added, this can be removed, and the rest of the system will work
// quite nicely. Perhaps a good first candidate would be to allow string "false" coerced to boolean warning
// to be suppressed on a per file basis?
- Note("There are currently no warning suppressions defined, but some will be added in the future",
+ Note("There are currently no warning suppressions defined, but some will be added in the future",
CHVersion.V0_0_0);
private SuppressWarnings(String docs, Version version) {
this.docs = docs;
this.version = version;
}
-
+
private final String docs;
private final Version version;
@Override
diff --git a/src/main/java/com/laytonsmith/core/compiler/LexerObject.java b/src/main/java/com/laytonsmith/core/compiler/LexerObject.java
index 1dfb074b12..483a7223ea 100644
--- a/src/main/java/com/laytonsmith/core/compiler/LexerObject.java
+++ b/src/main/java/com/laytonsmith/core/compiler/LexerObject.java
@@ -259,12 +259,12 @@ public TokenStream lex() throws ConfigCompileException {
if(c == '*' && c2 == '/') {
state_in_block_comment = false;
i++;
- if(state_in_smart_block_comment) {
- //We need to process the block comment here
- //TODO:
- //We need to process the block comment here
- //TODO:
- }
+// if(state_in_smart_block_comment) {
+// //We need to process the block comment here
+// //TODO:
+// //We need to process the block comment here
+// //TODO:
+// }
clearBuffer();
continue;
}
diff --git a/src/main/java/com/laytonsmith/core/constructs/CSymbol.java b/src/main/java/com/laytonsmith/core/constructs/CSymbol.java
index bddbbf1fac..ce8526cd99 100644
--- a/src/main/java/com/laytonsmith/core/constructs/CSymbol.java
+++ b/src/main/java/com/laytonsmith/core/constructs/CSymbol.java
@@ -70,15 +70,15 @@ public CSymbol(String symbol, Token.TType type, Target target) {
case LOGICAL_NOT:
conversion = "not";
break;
-// case BIT_AND:
-// conversion = "bit_and";
-// break;
-// case BIT_OR:
-// conversion = "bit_or";
-// break;
-// case BIT_XOR:
-// conversion = "bit_xor";
-// break;
+// case BIT_AND:
+// conversion = "bit_and";
+// break;
+// case BIT_OR:
+// conversion = "bit_or";
+// break;
+// case BIT_XOR:
+// conversion = "bit_xor";
+// break;
case MODULO:
conversion = "mod";
break;
@@ -125,17 +125,17 @@ public boolean isEquality() {
return symbolType.isEquality();
}
-// public boolean isBitwiseAnd() {
-// return symbolType.isBitwiseAnd();
-// }
+// public boolean isBitwiseAnd() {
+// return symbolType.isBitwiseAnd();
+// }
//
-// public boolean isBitwiseXor() {
-// return symbolType.isBitwiseXor();
-// }
+// public boolean isBitwiseXor() {
+// return symbolType.isBitwiseXor();
+// }
//
-// public boolean isBitwiseOr() {
-// return symbolType.isBitwiseOr();
-// }
+// public boolean isBitwiseOr() {
+// return symbolType.isBitwiseOr();
+// }
public boolean isLogicalAnd() {
return symbolType.isLogicalAnd();
}
diff --git a/src/main/java/com/laytonsmith/core/constructs/Token.java b/src/main/java/com/laytonsmith/core/constructs/Token.java
index e44db21052..f697313bfa 100644
--- a/src/main/java/com/laytonsmith/core/constructs/Token.java
+++ b/src/main/java/com/laytonsmith/core/constructs/Token.java
@@ -165,17 +165,17 @@ public boolean isEquality() {
return this.variants.contains(TokenVariant.EQUALITY);
}
-// public boolean isBitwiseAnd(){
-// return (this == BIT_AND);
-// }
+// public boolean isBitwiseAnd(){
+// return (this == BIT_AND);
+// }
//
-// public boolean isBitwiseXor(){
-// return (this == BIT_XOR);
-// }
+// public boolean isBitwiseXor(){
+// return (this == BIT_XOR);
+// }
//
-// public boolean isBitwiseOr(){
-// return (this == BIT_OR);
-// }
+// public boolean isBitwiseOr(){
+// return (this == BIT_OR);
+// }
/**
* Returns true if this is a logical and
*
diff --git a/src/main/java/com/laytonsmith/core/events/AbstractEvent.java b/src/main/java/com/laytonsmith/core/events/AbstractEvent.java
index 24409b89fb..5e8c0cb8e7 100644
--- a/src/main/java/com/laytonsmith/core/events/AbstractEvent.java
+++ b/src/main/java/com/laytonsmith/core/events/AbstractEvent.java
@@ -36,11 +36,11 @@
public abstract class AbstractEvent implements Event, Comparable {
private EventMixinInterface mixin;
-// protected EventHandlerInterface handler;
+// protected EventHandlerInterface handler;
//
-// protected AbstractEvent(EventHandlerInterface handler){
-// this.handler = handler;
-// }
+// protected AbstractEvent(EventHandlerInterface handler){
+// this.handler = handler;
+// }
//
public final void setAbstractEventMixin(EventMixinInterface mixin) {
diff --git a/src/main/java/com/laytonsmith/core/events/BoundEvent.java b/src/main/java/com/laytonsmith/core/events/BoundEvent.java
index 5339f8790d..754e68cc09 100644
--- a/src/main/java/com/laytonsmith/core/events/BoundEvent.java
+++ b/src/main/java/com/laytonsmith/core/events/BoundEvent.java
@@ -301,21 +301,21 @@ private void execute(Environment env, ActiveEvent activeEvent) throws EventExcep
}
//TODO: Once ParseTree supports these again, we may bring this back
-// /**
-// * Returns true if this event MUST be synchronous.
-// * @return
-// */
-// public boolean isSync(){
-// return tree.isSync();
-// }
+// /**
+// * Returns true if this event MUST be synchronous.
+// * @return
+// */
+// public boolean isSync(){
+// return tree.isSync();
+// }
//
-// /**
-// * Returns true if this event MUST be asynchronous.
-// * @return
-// */
-// public boolean isAsync(){
-// return tree.isAsync();
-// }
+// /**
+// * Returns true if this event MUST be asynchronous.
+// * @return
+// */
+// public boolean isAsync(){
+// return tree.isAsync();
+// }
public ParseTree getParseTree() {
return tree;
}
@@ -514,15 +514,15 @@ public void addWhenCancelled(CClosure tree) {
}
public void executeTriggered() {
-// for(Pair pair : whenTriggered){
-// MethodScriptCompiler.execute(pair.fst, pair.snd, null, null);
-// }
+// for(Pair pair : whenTriggered){
+// MethodScriptCompiler.execute(pair.fst, pair.snd, null, null);
+// }
}
public void executeCancelled() {
-// for(Pair pair : whenCancelled){
-// MethodScriptCompiler.execute(pair.fst, pair.snd, null, null);
-// }
+// for(Pair pair : whenCancelled){
+// MethodScriptCompiler.execute(pair.fst, pair.snd, null, null);
+// }
}
}
}
diff --git a/src/main/java/com/laytonsmith/core/events/EventBuilder.java b/src/main/java/com/laytonsmith/core/events/EventBuilder.java
index e2cc2d88c3..daf6ee62f0 100644
--- a/src/main/java/com/laytonsmith/core/events/EventBuilder.java
+++ b/src/main/java/com/laytonsmith/core/events/EventBuilder.java
@@ -110,7 +110,7 @@ public static T instantiate(Class extends BindableEv
return null;
}
-// public static MCPlayerJoinEvent MCPlayerJoinEvent(MCPlayer player, String message){
-// return instantiate(MCPlayerJoinEvent.class, player, message);
-// }
+// public static MCPlayerJoinEvent MCPlayerJoinEvent(MCPlayer player, String message){
+// return instantiate(MCPlayerJoinEvent.class, player, message);
+// }
}
diff --git a/src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java b/src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
index 962e2eb499..9fba8eab5a 100644
--- a/src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
+++ b/src/main/java/com/laytonsmith/core/events/drivers/BlockEvents.java
@@ -10,7 +10,19 @@
import com.laytonsmith.abstraction.enums.MCIgniteCause;
import com.laytonsmith.abstraction.enums.MCInstrument;
import com.laytonsmith.abstraction.enums.MCTone;
-import com.laytonsmith.abstraction.events.*;
+import com.laytonsmith.abstraction.events.MCBlockBreakEvent;
+import com.laytonsmith.abstraction.events.MCBlockBurnEvent;
+import com.laytonsmith.abstraction.events.MCBlockDispenseEvent;
+import com.laytonsmith.abstraction.events.MCBlockFadeEvent;
+import com.laytonsmith.abstraction.events.MCBlockFromToEvent;
+import com.laytonsmith.abstraction.events.MCBlockGrowEvent;
+import com.laytonsmith.abstraction.events.MCBlockIgniteEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonExtendEvent;
+import com.laytonsmith.abstraction.events.MCBlockPistonRetractEvent;
+import com.laytonsmith.abstraction.events.MCBlockPlaceEvent;
+import com.laytonsmith.abstraction.events.MCNotePlayEvent;
+import com.laytonsmith.abstraction.events.MCSignChangeEvent;
import com.laytonsmith.annotations.api;
import com.laytonsmith.core.CHVersion;
import com.laytonsmith.core.ObjectGenerator;
diff --git a/src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java b/src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java
index 21b446306b..10597d3489 100644
--- a/src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java
+++ b/src/main/java/com/laytonsmith/core/events/drivers/PlayerEvents.java
@@ -16,7 +16,31 @@
import com.laytonsmith.abstraction.enums.MCFishingState;
import com.laytonsmith.abstraction.enums.MCGameMode;
import com.laytonsmith.abstraction.enums.MCTeleportCause;
-import com.laytonsmith.abstraction.events.*;
+import com.laytonsmith.abstraction.events.MCChatTabCompleteEvent;
+import com.laytonsmith.abstraction.events.MCExpChangeEvent;
+import com.laytonsmith.abstraction.events.MCFoodLevelChangeEvent;
+import com.laytonsmith.abstraction.events.MCGamemodeChangeEvent;
+import com.laytonsmith.abstraction.events.MCPlayerBedEvent;
+import com.laytonsmith.abstraction.events.MCPlayerChatEvent;
+import com.laytonsmith.abstraction.events.MCPlayerCommandEvent;
+import com.laytonsmith.abstraction.events.MCPlayerDeathEvent;
+import com.laytonsmith.abstraction.events.MCPlayerEditBookEvent;
+import com.laytonsmith.abstraction.events.MCPlayerFishEvent;
+import com.laytonsmith.abstraction.events.MCPlayerInteractEvent;
+import com.laytonsmith.abstraction.events.MCPlayerItemConsumeEvent;
+import com.laytonsmith.abstraction.events.MCPlayerJoinEvent;
+import com.laytonsmith.abstraction.events.MCPlayerKickEvent;
+import com.laytonsmith.abstraction.events.MCPlayerLoginEvent;
+import com.laytonsmith.abstraction.events.MCPlayerMoveEvent;
+import com.laytonsmith.abstraction.events.MCPlayerPortalEvent;
+import com.laytonsmith.abstraction.events.MCPlayerPreLoginEvent;
+import com.laytonsmith.abstraction.events.MCPlayerQuitEvent;
+import com.laytonsmith.abstraction.events.MCPlayerRespawnEvent;
+import com.laytonsmith.abstraction.events.MCPlayerTeleportEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleFlightEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleSneakEvent;
+import com.laytonsmith.abstraction.events.MCPlayerToggleSprintEvent;
+import com.laytonsmith.abstraction.events.MCWorldChangedEvent;
import com.laytonsmith.annotations.api;
import com.laytonsmith.annotations.hide;
import com.laytonsmith.commandhelper.CommandHelperPlugin;
@@ -1051,9 +1075,9 @@ public boolean matches(Map prefilter, BindableEvent e) throws
if(e instanceof MCPlayerInteractEvent) {
MCPlayerInteractEvent pie = (MCPlayerInteractEvent) e;
Prefilters.match(prefilter, "location", pie.getClickedBlock().getLocation(), PrefilterType.LOCATION_MATCH);
- if(prefilter.containsKey("activated")) {
- //TODO: Once activation is supported, check for that here
- }
+// if(prefilter.containsKey("activated")) {
+// //TODO: Once activation is supported, check for that here
+// }
return true;
}
return false;
diff --git a/src/main/java/com/laytonsmith/core/exceptions/ConfigRuntimeException.java b/src/main/java/com/laytonsmith/core/exceptions/ConfigRuntimeException.java
index 9e0c2d4a8a..eed1fd4612 100644
--- a/src/main/java/com/laytonsmith/core/exceptions/ConfigRuntimeException.java
+++ b/src/main/java/com/laytonsmith/core/exceptions/ConfigRuntimeException.java
@@ -412,12 +412,12 @@ public void setTarget(Target t) {
this.target = t;
}
-// public ConfigRuntimeException(String msg, ExceptionType ex, int line_num){
-// this(msg, ex, line_num, null);
-// }
-// public ConfigRuntimeException(String msg, int line_num){
-// this(msg, null, line_num, null);
-// }
+// public ConfigRuntimeException(String msg, ExceptionType ex, int line_num){
+// this(msg, ex, line_num, null);
+// }
+// public ConfigRuntimeException(String msg, int line_num){
+// this(msg, null, line_num, null);
+// }
/**
* Creates an uncatchable exception. This should rarely be used. An uncatchable exception is one where the user code
* is unable to catch the exception, and the type of the exception is null. Generally, this should only be used for
diff --git a/src/main/java/com/laytonsmith/core/federation/FederationCommunication.java b/src/main/java/com/laytonsmith/core/federation/FederationCommunication.java
index 0cf643087c..84bd8ef62a 100644
--- a/src/main/java/com/laytonsmith/core/federation/FederationCommunication.java
+++ b/src/main/java/com/laytonsmith/core/federation/FederationCommunication.java
@@ -135,7 +135,7 @@ public void writeUnencrypted(byte[] bytes) throws IOException {
public String readUnencryptedLine() throws IOException {
try {
// Don't put the reader in a try with resources, because we don't actually
- // want to close the reader when we're done; that would close the actual
+ // want to close the reader when we're done; that would close the actual
// InputStream as well. We're just using the BufferedReader as a shortcut
// to reading this part of the stream.
List bytes = new ArrayList<>();
diff --git a/src/main/java/com/laytonsmith/core/functions/Compiler.java b/src/main/java/com/laytonsmith/core/functions/Compiler.java
index 9b7fee7262..125ec97a92 100644
--- a/src/main/java/com/laytonsmith/core/functions/Compiler.java
+++ b/src/main/java/com/laytonsmith/core/functions/Compiler.java
@@ -770,11 +770,11 @@ public ParseTree optimizeDynamic(Target t, List children, FileOptions
if(complex.matches("[a-zA-Z0-9_]+")) {
//This is a simple variable name.
root.addChild(new ParseTree(new IVariable("@" + complex, t), fileOptions));
+ continue;
} else {
//Complex variable name, with arrays (or perhaps an error case)
-
+ continue;
}
- continue;
}
b.append(c);
}
diff --git a/src/main/java/com/laytonsmith/core/functions/DataHandling.java b/src/main/java/com/laytonsmith/core/functions/DataHandling.java
index 4d1fb30a0e..3dfd1d761a 100644
--- a/src/main/java/com/laytonsmith/core/functions/DataHandling.java
+++ b/src/main/java/com/laytonsmith/core/functions/DataHandling.java
@@ -2293,18 +2293,18 @@ public static Construct optimizeProcedure(Target t, Procedure myProc, List children) throws ConfigCompileException, ConfigRuntimeException {
-// //We seriously lose out on the ability to optimize this procedure
-// //if we are assigning a dynamic value as a default, but we have to check
-// //that here. If we don't, we lose the information
-// return ;
-// }
+// @Override
+// public ParseTree optimizeDynamic(Target t, List children) throws ConfigCompileException, ConfigRuntimeException {
+// //We seriously lose out on the ability to optimize this procedure
+// //if we are assigning a dynamic value as a default, but we have to check
+// //that here. If we don't, we lose the information
+// return ;
+// }
}
@api
diff --git a/src/main/java/com/laytonsmith/core/functions/Debug.java b/src/main/java/com/laytonsmith/core/functions/Debug.java
index bbc1546705..847f4c1cb1 100644
--- a/src/main/java/com/laytonsmith/core/functions/Debug.java
+++ b/src/main/java/com/laytonsmith/core/functions/Debug.java
@@ -31,30 +31,30 @@
*/
public class Debug {
-// public static boolean EVENT_LOGGING = false;
-// public static int EVENT_LOGGING_LEVEL = 1;
-// public static final Set EVENT_LOGGING_FILTER = new HashSet();
-// public static final Set EVENT_PLUGIN_FILTER = new HashSet();
+// public static boolean EVENT_LOGGING = false;
+// public static int EVENT_LOGGING_LEVEL = 1;
+// public static final Set EVENT_LOGGING_FILTER = new HashSet();
+// public static final Set EVENT_PLUGIN_FILTER = new HashSet();
//public static boolean LOG_TO_SCREEN = false;
-// public static void DoLog(Event.Type filter, int verbosity, String message) {
-// synchronized (EVENT_LOGGING_FILTER) {
-// if (EVENT_LOGGING && EVENT_LOGGING_FILTER.contains(filter) && EVENT_LOGGING_LEVEL >= verbosity) {
-// try {
-// Static.LogDebug(message);
-// } catch (IOException ex) {
-// Logger.getLogger(Debug.class.getVariableName()).log(Level.SEVERE, null, ex);
-// }
-// }
-// }
-// }
-//
-// public static boolean IsFiltered(Plugin plugin) {
-// if (EVENT_PLUGIN_FILTER.isEmpty()) {
-// return true;
-// } else {
-// return EVENT_PLUGIN_FILTER.contains(plugin.getClass().getSimpleName().toUpperCase());
-// }
-// }
+// public static void DoLog(Event.Type filter, int verbosity, String message) {
+// synchronized (EVENT_LOGGING_FILTER) {
+// if (EVENT_LOGGING && EVENT_LOGGING_FILTER.contains(filter) && EVENT_LOGGING_LEVEL >= verbosity) {
+// try {
+// Static.LogDebug(message);
+// } catch (IOException ex) {
+// Logger.getLogger(Debug.class.getVariableName()).log(Level.SEVERE, null, ex);
+// }
+// }
+// }
+// }
+//
+// public static boolean IsFiltered(Plugin plugin) {
+// if (EVENT_PLUGIN_FILTER.isEmpty()) {
+// return true;
+// } else {
+// return EVENT_PLUGIN_FILTER.contains(plugin.getClass().getSimpleName().toUpperCase());
+// }
+// }
public static String docs() {
return "Provides methods for viewing data about both CommandHelper and the other plugins in your server. Though not meant to"
+ " be called by normal scripts, these methods are available everywhere other methods are available. Note that for"
@@ -62,135 +62,135 @@ public static String docs() {
+ " interpreter mode.";
}
-// @api
-// public static class dump_listeners extends AbstractFunction {
-//
-// public String getVariableName() {
-// return "dump_listeners";
-// }
-//
-// public Integer[] numArgs() {
-// return new Integer[]{0, 1, 2};
-// }
-//
-// public String docs() {
-// return " {[typeFilter], [verboseLevel]} Send null as the typeFilter to see possibilities. VerboseLevel can be 1-4";
-// }
-//
-// public Class extends CREThrowable>[] thrown() {
-// return new Class[]{CRECastException.class, CRESecurityException.class};
-// }
-//
-// public boolean isRestricted() {
-// return true;
-// }
-//
-// public boolean preResolveVariables() {
-// return true;
-// }
-//
-// public CHVersion since() {
-// return "0.0.0";
-// }
-//
-// public Boolean runAsync() {
-// return false;
-// }
-//
-// public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException {
-// if (!(Boolean) Static.getPreferences().getPreference("allow-debug-logging")) {
-// throw new ConfigRuntimeException("allow-debug-logging is currently set to false. To use " + this.getVariableName() + ", enable it in your preferences.", CRESecurityException.class, t);
-// }
-// StringBuilder b = new StringBuilder("\n");
-// if (args.length >= 1 && args[0] instanceof CNull) {
-// b.append("You can sort the listeners further by specifying one of the options:\n");
-// for (Event.Type t : Event.Type.values()) {
-// b.append(t.name()).append("\n");
-// }
-// return new CString(b.toString(), 0, null);
-// }
-// int verbosity = 1;
-// if (args.length == 2) {
-// verbosity = Static.getInt32(args[1]);
-// }
-// try {
-// SimplePluginManager pm = (SimplePluginManager) AliasCore.parent.getServer().getPluginManager();
-// Field fListener = SimplePluginManager.class.getDeclaredField("listeners");
-// //set it to public
-// fListener.setAccessible(true);
-// EnumMap