Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics take2 #1294

Open
wants to merge 101 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
ce133b9
Initial commit of generics
LadyCailin Nov 1, 2021
368e90e
Merge branch 'master' into generics
LadyCailin Nov 1, 2021
5c4344d
Still working on changes to add environment in places
LadyCailin Nov 4, 2021
64fb221
Finish refactoring process
LadyCailin Nov 5, 2021
d521be5
Compiles again
LadyCailin Nov 11, 2021
d431fc2
Move instanceof logic to InstanceofUtil + Fix SA instanceof reference…
Pieter12345 Nov 11, 2021
32d16fc
Merge branch 'master' into genericsTake2
PseudoKnight Dec 3, 2021
b0d46a0
Merge branch 'master' into genericsTake2
PseudoKnight Dec 17, 2021
bcaf404
Additional changes. Mostly code complete, though not working.
LadyCailin Feb 11, 2022
edc959c
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Feb 11, 2022
b737796
Merge branch 'master' into genericsTake2
LadyCailin Feb 13, 2022
958a03b
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Feb 25, 2022
e3825c1
Finish generic constraint validation
LadyCailin Feb 27, 2022
ee55d6a
typeof needs Environment
LadyCailin Mar 3, 2022
239a132
Fix provisonal-build and 2 unit tests
LadyCailin Mar 21, 2022
592ab47
Add LeftHandSideType, and rework generics to fix all unit tests.
LadyCailin Mar 23, 2022
921a0c8
Fix tests
LadyCailin Mar 23, 2022
0465349
Merge branch 'master' into genericsTake2
LadyCailin Mar 24, 2022
6121779
Fix player_command bind
LadyCailin Mar 24, 2022
036b753
Use a static cache for native classes
LadyCailin Mar 24, 2022
ba7ebd5
Add back in more deprecated methods
LadyCailin Mar 24, 2022
668e37e
Add @AggressiveDeprecation annotation
LadyCailin Mar 25, 2022
ab14f00
Readd all no-env methods with AggressiveDeprecation
LadyCailin Mar 29, 2022
5d5ba81
Fix javadoc
LadyCailin Mar 29, 2022
809a724
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Mar 29, 2022
8ca78e4
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Mar 30, 2022
89aba77
Change return type and parameter of merged code
LadyCailin Mar 30, 2022
7a09ff0
Update syntax in NewObjects
LadyCailin Mar 30, 2022
23cd8f5
Fix null assignments
LadyCailin Mar 31, 2022
c68d103
Apply changes based on PR comments
LadyCailin Mar 31, 2022
b70b209
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Mar 31, 2022
b9aae16
Bugfixes
LadyCailin Mar 31, 2022
265949e
Fix and() function signature
Pieter12345 Mar 31, 2022
32f2d4a
Cache ClassMirror's JVM name
LadyCailin Apr 1, 2022
f861f77
Merge branch 'genericsTake2' of github.com:EngineHub/CommandHelper in…
LadyCailin Apr 1, 2022
24117ca
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 1, 2022
26151e4
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 2, 2022
cde5f4c
Pass GenericParameters in to functions.
LadyCailin Apr 2, 2022
0a6bd55
Also convert leftover test method
LadyCailin Apr 2, 2022
f40c67d
Provide runtime backwards compatible Event for extensions
LadyCailin Apr 2, 2022
2510cf2
CS
LadyCailin Apr 2, 2022
5b645c1
Merge branch 'master' into genericsTake2
LadyCailin Apr 3, 2022
8438464
Add back old CArray constructors as aggressively deprecated
LadyCailin Apr 3, 2022
9aab1c1
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 3, 2022
4327ee0
Rework how generics are stored in Construct
LadyCailin Apr 3, 2022
aa5bc2c
Support GenericDeclaration in function signatures
LadyCailin Apr 3, 2022
6ba3f82
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 4, 2022
6dc811d
Remove erroneous code
LadyCailin Apr 4, 2022
ee4379c
Better error message
LadyCailin Apr 4, 2022
5bc8cc0
Resolve typename before returning up further.
LadyCailin Apr 5, 2022
ab74ad2
Unbundle and rethrow CREs in exec when using reflection
LadyCailin Apr 5, 2022
205e3b3
Add more AggressiveDeprecations.
LadyCailin Apr 5, 2022
ef358b7
Merge branch 'master' into genericsTake2
LadyCailin Apr 6, 2022
f18e0f8
Add aggressivedeprecation on IncludeCache.registerAutoIncludes
LadyCailin Apr 6, 2022
37d1ed4
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 6, 2022
c8221fa
Add deprecated versions of set back to CArray
LadyCailin Apr 6, 2022
f0faa0b
Oops
LadyCailin Apr 6, 2022
5516d5e
Remove registerAutoIncludes
LadyCailin Apr 6, 2022
722495f
Add a log output if the aggressive deprecation meets criteria for rem…
LadyCailin Apr 6, 2022
e42666e
cleanup
LadyCailin Apr 7, 2022
8ad1434
Allow "teeing up" of aggressive deprecations.
LadyCailin Apr 7, 2022
85ed2f4
Support type inference for generic typenames
LadyCailin Apr 10, 2022
9900ee1
CS
LadyCailin Apr 11, 2022
0e3667f
Add cast().
LadyCailin Apr 11, 2022
082cd9b
CS
LadyCailin Apr 11, 2022
28a037a
Speculative fix for reported issue
LadyCailin Apr 12, 2022
f658e57
Add additional unit tests
LadyCailin Apr 12, 2022
f091c99
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Apr 12, 2022
909efe8
Missed a change
LadyCailin Apr 12, 2022
c6834b2
Use the correct SA object
LadyCailin Apr 12, 2022
1726fd2
cs
LadyCailin Apr 12, 2022
0d78170
Speculative fix and additional logging
LadyCailin Apr 13, 2022
94910ec
Resolve type unions also, for when there is only one inferred type
LadyCailin Apr 13, 2022
0a2b7d3
cs
LadyCailin Apr 13, 2022
7a9ffe8
Fix centry typechecking
LadyCailin Apr 13, 2022
b0af7fd
cs
LadyCailin Apr 13, 2022
8f1a8a0
Make constants their actual type in strict mode, auto otherwise.
LadyCailin Apr 14, 2022
7e00c25
Merge branch 'master' into genericsTake2
LadyCailin Apr 19, 2022
f0f9a6c
Merge branch 'master' into genericsTake2
LadyCailin Apr 19, 2022
3cd8334
dev drop
LadyCailin Apr 22, 2022
d376ad5
Merge branch 'master' into genericsTake2
LadyCailin Apr 22, 2022
8d15bee
Create GenericTypeParameters, which are the typechecking generics
LadyCailin Apr 27, 2022
3817ae9
Merge branch 'master' into genericsTake2
LadyCailin Apr 27, 2022
5fc3192
URL encode spaces in ClassMirror
LadyCailin Apr 27, 2022
48d21b6
Use proper URL escaping
LadyCailin Apr 27, 2022
641a316
Revert "Use proper URL escaping"
LadyCailin Apr 27, 2022
031e0ad
Maybe fixed now
LadyCailin Apr 27, 2022
97ff952
Add asserts to track down failures
LadyCailin Apr 27, 2022
957f176
Decode that shit
LadyCailin Apr 27, 2022
535f9bc
Cleanup build output and clarify logs
LadyCailin Apr 27, 2022
44fe145
Merge branch 'master' into genericsTake2
LadyCailin Apr 28, 2022
8488d39
Merge branch 'master' into genericsTake2
LadyCailin May 5, 2022
1131858
Add support for `as` keyword for cast.
LadyCailin May 5, 2022
2946044
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin May 5, 2022
937576b
Begin initial implementation of VariadicGenericTypes.
LadyCailin May 6, 2022
0f91e3f
Merge branch 'master' into genericsTake2
LadyCailin May 7, 2022
199b33b
Implement generics in Callables.
LadyCailin May 8, 2022
78eb89a
Merge branch 'master' into genericsTake2
PseudoKnight Jun 15, 2022
f5aeffb
Merge branch 'master' into genericsTake2
PseudoKnight Jul 5, 2022
1cade80
Merge remote-tracking branch 'origin/master' into genericsTake2
LadyCailin Jan 9, 2023
0f3dc21
Merge branch 'master' into genericsTake2
LadyCailin Sep 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ public static void checkForTypeInTypeofClasses() throws Exception {
errors.add("TYPE is null? " + clazz.getClassName());
continue;
}
if(!type.val().equals(clazz.getAnnotation(typeof.class).getValue("value"))) {
errors.add(clazz.getClassName() + "'s TYPE value is different than the typeof annotation on it");
String classType = type.val().replaceAll("<.*>", "");
if(!classType.equals(clazz.getAnnotation(typeof.class).getValue("value"))) {
errors.add(clazz.getClassName() + "'s TYPE value is different than the typeof annotation on it"
+ " (expected " + clazz.getAnnotation(typeof.class).getValue("value") + " but"
+ " got " + type.val() + ")");
}
} catch (ReflectionUtils.ReflectionException ex) {
errors.add(clazz.getClassName() + " needs to add the following:\n\t@SuppressWarnings(\"FieldNameHidesFieldInSuperclass\")\n"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.laytonsmith.abstraction;

import com.laytonsmith.PureUtilities.DaemonManager;
import com.laytonsmith.core.environments.Environment;
import com.laytonsmith.core.events.BindableEvent;
import com.laytonsmith.core.events.Driver;
import com.laytonsmith.core.events.EventUtils;
Expand All @@ -24,15 +25,15 @@ public void addShutdownHook(Runnable r) {
}

@Override
public void runShutdownHooks() {
public void runShutdownHooks(Environment env) {
// Fire off the shutdown event, before we shut down all the internal hooks
EventUtils.TriggerListener(Driver.SHUTDOWN, "shutdown", new BindableEvent() {

@Override
public Object _GetObject() {
return new Object();
}
});
}, env);
Iterator<Runnable> iter = shutdownHooks.iterator();
while(iter.hasNext()) {
iter.next().run();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/laytonsmith/abstraction/Convertor.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public interface Convertor {
* Runs all the registered shutdown hooks. This should only be called by the shutdown mechanism. After running, each
* Runnable will be removed from the queue.
*/
void runShutdownHooks();
void runShutdownHooks(Environment env);

/**
* Runs some task on the "main" thread, possibly now, possibly in the future, and possibly even on this thread.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@
import com.laytonsmith.abstraction.MCPlugin;
import com.laytonsmith.abstraction.bukkit.events.BukkitMiscEvents.BukkitMCCommandTabCompleteEvent;
import com.laytonsmith.commandhelper.CommandHelperPlugin;
import com.laytonsmith.core.Static;
import com.laytonsmith.core.constructs.CArray;
import com.laytonsmith.core.constructs.CBoolean;
import com.laytonsmith.core.constructs.CClosure;
import com.laytonsmith.core.constructs.CString;
import com.laytonsmith.core.constructs.Target;
import com.laytonsmith.core.constructs.generics.GenericParameters;
import com.laytonsmith.core.environments.CommandHelperEnvironment;
import com.laytonsmith.core.environments.Environment;
import com.laytonsmith.core.events.Driver;
import com.laytonsmith.core.events.EventUtils;
import com.laytonsmith.core.exceptions.CRE.CREPluginInternalException;
import com.laytonsmith.core.exceptions.ConfigRuntimeException;
import com.laytonsmith.core.functions.Commands;
import com.laytonsmith.core.natives.interfaces.Mixed;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import org.bukkit.command.PluginCommand;
import org.bukkit.command.PluginIdentifiableCommand;
import org.bukkit.plugin.Plugin;

import java.util.ArrayList;
import java.util.List;

public class BukkitMCCommand implements MCCommand {

Command cmd;
Expand Down Expand Up @@ -209,23 +213,30 @@ public String toString() {

@Override
public List<String> handleTabComplete(MCCommandSender sender, String alias, String[] args) {
Environment env;
try {
env = Static.GenerateStandaloneEnvironment();
LadyCailin marked this conversation as resolved.
Show resolved Hide resolved
} catch (Exception ex) {
throw new RuntimeException(ex);
}
if(Commands.onTabComplete.containsKey(cmd.getName().toLowerCase())) {
Target t = Target.UNKNOWN;
CArray cargs = new CArray(t);
CArray cargs = new CArray(t, GenericParameters.start(CArray.TYPE)
.addParameter(CString.TYPE, null).build(), env);
for(String arg : args) {
cargs.push(new CString(arg, t), t);
cargs.push(new CString(arg, t), t, env);
}
CClosure closure = Commands.onTabComplete.get(cmd.getName().toLowerCase());
closure.getEnv().getEnv(CommandHelperEnvironment.class).SetCommandSender(sender);
try {
Mixed fret = closure.executeCallable(null, t, new CString(alias, t), new CString(sender.getName(), t), cargs,
new CArray(t) // reserved for an obgen style command array
new CArray(t, null, env) // reserved for an obgen style command array
);
if(fret.isInstanceOf(CArray.TYPE)) {
if(fret.isInstanceOf(CArray.TYPE, null, env)) {
List<String> ret = new ArrayList<>();
if(((CArray) fret).inAssociativeMode()) {
for(Mixed key : ((CArray) fret).keySet()) {
ret.add(((CArray) fret).get(key, Target.UNKNOWN).val());
ret.add(((CArray) fret).get(key, Target.UNKNOWN, env).val());
}
} else {
for(Mixed value : ((CArray) fret).asList()) {
Expand All @@ -240,17 +251,24 @@ public List<String> handleTabComplete(MCCommandSender sender, String alias, Stri
}
}
BukkitMCCommandTabCompleteEvent event = new BukkitMCCommandTabCompleteEvent(sender, cmd, alias, args);
EventUtils.TriggerListener(Driver.TAB_COMPLETE, "tab_complete_command", event);
EventUtils.TriggerListener(Driver.TAB_COMPLETE, "tab_complete_command", event, CommandHelperPlugin.getCore().getLastLoadedEnv());
return event.getCompletions();
}

@Override
public boolean handleCustomCommand(MCCommandSender sender, String label, String[] args) {
Environment env;
try {
env = Static.GenerateStandaloneEnvironment();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
if(Commands.onCommand.containsKey(cmd.getName().toLowerCase())) {
Target t = Target.UNKNOWN;
CArray cargs = new CArray(t);
CArray cargs = new CArray(t, GenericParameters.start(CArray.TYPE)
.addParameter(CString.TYPE, null).build(), env);
for(String arg : args) {
cargs.push(new CString(arg, t), t);
cargs.push(new CString(arg, t), t, env);
}

CClosure closure = Commands.onCommand.get(cmd.getName().toLowerCase());
Expand All @@ -260,9 +278,9 @@ public boolean handleCustomCommand(MCCommandSender sender, String label, String[

try {
Mixed fret = closure.executeCallable(null, t, new CString(label, t), new CString(sender.getName(), t), cargs,
new CArray(t) // reserved for an obgen style command array
new CArray(t, null, env) // reserved for an obgen style command array
);
if(fret.isInstanceOf(CBoolean.TYPE)) {
if(fret.isInstanceOf(CBoolean.TYPE, null, env)) {
return ((CBoolean) fret).getBoolean();
}
} catch (ConfigRuntimeException cre) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
import com.laytonsmith.core.constructs.CArray;
import com.laytonsmith.core.constructs.CString;
import com.laytonsmith.core.constructs.Target;
import com.laytonsmith.core.constructs.generics.GenericParameters;
import com.laytonsmith.core.environments.Environment;
import com.laytonsmith.core.exceptions.CRE.CREIllegalArgumentException;
import org.bukkit.block.Block;
import org.bukkit.event.block.BlockBreakEvent;
Expand Down Expand Up @@ -367,7 +369,7 @@ public BukkitMCSignChangeEvent(SignChangeEvent e) {
public static BukkitMCSignChangeEvent _instantiate(MCBlock sign, MCPlayer player, CArray signtext) {
String[] text = new String[4];
for(int i = 0; i < signtext.size(); i++) {
text[i] = signtext.get(i, Target.UNKNOWN).toString();
text[i] = signtext.get(i, Target.UNKNOWN, null).toString();
}
return new BukkitMCSignChangeEvent(new SignChangeEvent(((BukkitMCBlock) sign).__Block(), ((BukkitMCPlayer) player)._Player(),
text));
Expand All @@ -384,11 +386,12 @@ public CString getLine(int index) {
}

@Override
public CArray getLines() {
CArray retn = new CArray(Target.UNKNOWN);
public CArray getLines(Environment env) {
CArray retn = new CArray(Target.UNKNOWN, GenericParameters.start(CArray.TYPE)
.addParameter(CString.TYPE, null).build(), env);

for(int i = 0; i < 4; i++) {
retn.push(new CString(pie.getLine(i), Target.UNKNOWN), Target.UNKNOWN);
retn.push(new CString(pie.getLine(i), Target.UNKNOWN), Target.UNKNOWN, env);
}

return retn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.laytonsmith.abstraction.MCItemStack;
import com.laytonsmith.abstraction.bukkit.events.BukkitBlockEvents;
import com.laytonsmith.commandhelper.CommandHelperPlugin;
import com.laytonsmith.core.events.Driver;
import com.laytonsmith.core.events.EventUtils;

import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
Expand All @@ -19,6 +19,7 @@
import org.bukkit.event.block.BlockDispenseEvent;
import org.bukkit.event.block.BlockExplodeEvent;
import org.bukkit.event.block.BlockFadeEvent;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.event.block.BlockFromToEvent;
import org.bukkit.event.block.BlockGrowEvent;
import org.bukkit.event.block.BlockIgniteEvent;
Expand All @@ -27,7 +28,6 @@
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.block.NotePlayEvent;
import org.bukkit.event.block.SignChangeEvent;
import org.bukkit.event.block.BlockFormEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.PluginManager;

Expand All @@ -36,25 +36,25 @@ public class BukkitBlockListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST)
public void onPistonExtend(final BlockPistonExtendEvent e) {
BukkitBlockEvents.BukkitMCBlockPistonExtendEvent mce = new BukkitBlockEvents.BukkitMCBlockPistonExtendEvent(e);
EventUtils.TriggerListener(Driver.PISTON_EXTEND, "piston_extend", mce);
EventUtils.TriggerListener(Driver.PISTON_EXTEND, "piston_extend", mce, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onPistonRetract(final BlockPistonRetractEvent e) {
BukkitBlockEvents.BukkitMCBlockPistonRetractEvent mce = new BukkitBlockEvents.BukkitMCBlockPistonRetractEvent(e);
EventUtils.TriggerListener(Driver.PISTON_RETRACT, "piston_retract", mce);
EventUtils.TriggerListener(Driver.PISTON_RETRACT, "piston_retract", mce, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onSignChange(SignChangeEvent e) {
BukkitBlockEvents.BukkitMCSignChangeEvent mce = new BukkitBlockEvents.BukkitMCSignChangeEvent(e);
EventUtils.TriggerListener(Driver.SIGN_CHANGED, "sign_changed", mce);
EventUtils.TriggerListener(Driver.SIGN_CHANGED, "sign_changed", mce, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockPlace(BlockPlaceEvent e) {
BukkitBlockEvents.BukkitMCBlockPlaceEvent bpe = new BukkitBlockEvents.BukkitMCBlockPlaceEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_PLACE, "block_place", bpe);
EventUtils.TriggerListener(Driver.BLOCK_PLACE, "block_place", bpe, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

private static boolean ignorebreak = false;
Expand All @@ -65,7 +65,7 @@ public void onBlockBreak(BlockBreakEvent e) {
return;
}
BukkitBlockEvents.BukkitMCBlockBreakEvent bbe = new BukkitBlockEvents.BukkitMCBlockBreakEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_BREAK, "block_break", bbe);
EventUtils.TriggerListener(Driver.BLOCK_BREAK, "block_break", bbe, CommandHelperPlugin.getCore().getLastLoadedEnv());
if(bbe.isModified() && !e.isCancelled()) {
if(bbe.getDrops().isEmpty()) {
e.setDropItems(false);
Expand Down Expand Up @@ -104,54 +104,54 @@ public void onBlockBreak(BlockBreakEvent e) {
@EventHandler(priority = EventPriority.LOWEST)
public void onBlockDispense(BlockDispenseEvent e) {
BukkitBlockEvents.BukkitMCBlockDispenseEvent bde = new BukkitBlockEvents.BukkitMCBlockDispenseEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_DISPENSE, "block_dispense", bde);
EventUtils.TriggerListener(Driver.BLOCK_DISPENSE, "block_dispense", bde, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockBurn(BlockBurnEvent e) {
BukkitBlockEvents.BukkitMCBlockBurnEvent bbe = new BukkitBlockEvents.BukkitMCBlockBurnEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_BURN, "block_burn", bbe);
EventUtils.TriggerListener(Driver.BLOCK_BURN, "block_burn", bbe, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockFromTo(BlockFromToEvent e) {
BukkitBlockEvents.BukkitMCBlockFromToEvent bbe = new BukkitBlockEvents.BukkitMCBlockFromToEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_FROM_TO, "block_from_to", bbe);
EventUtils.TriggerListener(Driver.BLOCK_FROM_TO, "block_from_to", bbe, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockIgnite(BlockIgniteEvent e) {
BukkitBlockEvents.BukkitMCBlockIgniteEvent bie = new BukkitBlockEvents.BukkitMCBlockIgniteEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_IGNITE, "block_ignite", bie);
EventUtils.TriggerListener(Driver.BLOCK_IGNITE, "block_ignite", bie, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockGrow(BlockGrowEvent e) {
BukkitBlockEvents.BukkitMCBlockGrowEvent bge = new BukkitBlockEvents.BukkitMCBlockGrowEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_GROW, "block_grow", bge);
EventUtils.TriggerListener(Driver.BLOCK_GROW, "block_grow", bge, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onNotePlay(NotePlayEvent e) {
BukkitBlockEvents.BukkitMCNotePlayEvent npe = new BukkitBlockEvents.BukkitMCNotePlayEvent(e);
EventUtils.TriggerListener(Driver.NOTE_PLAY, "note_play", npe);
EventUtils.TriggerListener(Driver.NOTE_PLAY, "note_play", npe, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockFade(BlockFadeEvent e) {
BukkitBlockEvents.BukkitMCBlockFadeEvent bfe = new BukkitBlockEvents.BukkitMCBlockFadeEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_FADE, "block_fade", bfe);
EventUtils.TriggerListener(Driver.BLOCK_FADE, "block_fade", bfe, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockExplode(BlockExplodeEvent e) {
BukkitBlockEvents.BukkitMCBlockExplodeEvent bee = new BukkitBlockEvents.BukkitMCBlockExplodeEvent(e);
EventUtils.TriggerListener(Driver.BLOCK_EXPLODE, "block_explode", bee);
EventUtils.TriggerListener(Driver.BLOCK_EXPLODE, "block_explode", bee, CommandHelperPlugin.getCore().getLastLoadedEnv());
}

@EventHandler(priority = EventPriority.LOWEST)
public void onBlockForm(BlockFormEvent event) {
BukkitBlockEvents.BukkitBlockFormEventEvent form = new BukkitBlockEvents.BukkitBlockFormEventEvent(event);
EventUtils.TriggerListener(Driver.BLOCK_FORM, "block_form", form);
EventUtils.TriggerListener(Driver.BLOCK_FORM, "block_form", form, CommandHelperPlugin.getCore().getLastLoadedEnv());
}
}
Loading