WiIIiam278 / HuskTowns

A simple and elegant proxy-compatible Towny-style protection plugin
https://william278.net/project/husktowns
Apache License 2.0
76 stars 43 forks source link

refactor: rework hook registration #468

Closed ProdPreva1l closed 4 months ago

ProdPreva1l commented 5 months ago

New way to register a hook:

public class MyFancyHook extends Hook {
    @PluginHook(id = "MyFancyHook", register = PluginHook.Register.DELAYED, platform = "bukkit")
    public MyFancyHook(@NotNull HuskTowns plugin) {
        super(plugin);
    }
}
WiIIiam278 commented 5 months ago

Looks like this causes compile to fail during testing? Reflection might be breaking something here.

ProdPreva1l commented 5 months ago

i think it has to with worldguardhook, that was the issue last time

WiIIiam278 commented 5 months ago

it might be the Mockito trying to load the WG hook and going nuts for some reason. is it crashing trying to load WG classes?

ProdPreva1l commented 5 months ago

it might be the Mockito trying to load the WG hook and going nuts for some reason.

is it crashing trying to load WG classes?

i havent the slightest clue as to whats going wrong, maybe some bad accessors?

WiIIiam278 commented 5 months ago

I did find that you're registering each hook twice

ProdPreva1l commented 5 months ago

I did find that you're registering each hook twice

WHUUTT, lemme check this

ProdPreva1l commented 5 months ago

Bump

ProdPreva1l commented 4 months ago

Is there reviews that i cant see or am i tweaking bc i see "1 change requested" but no actual comments