Skip to content

Commit ffd109a

Browse files
committed
Added Launch services.launch
1 parent 6b3b987 commit ffd109a

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ dependencies {
123123
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.2' // For JUnit 5
124124
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.2' // For JUnit 5
125125

126-
installer('org.mangorage:installer:3.0.24')
126+
installer('org.mangorage:installer:3.0.28')
127127
botInternal(sourceSets.main.output)
128128

129129
runtimeOnly('org.apache.logging.log4j:log4j-slf4j-impl:2.23.1')
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*
2+
* Copyright (c) 2024. MangoRage
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18+
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19+
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
20+
* OR OTHER DEALINGS IN THE SOFTWARE.
21+
*/
22+
23+
package org.mangorage.eventbus.event;
24+
25+
import org.mangorage.eventbus.EventBus;
26+
import org.mangorage.eventbus.interfaces.IEvent;
27+
import org.mangorage.eventbus.interfaces.IEventBus;
28+
import org.mangorage.eventbus.interfaces.IEventType;
29+
30+
public class Test {
31+
private static final IEventBus<IEventType.INormalBusEvent> BUS = EventBus.create(new NormalEventHandler(), IEventType.INormalBusEvent.class);
32+
33+
public record Example(int amount) implements IEvent, IEventType.INormalBusEvent {
34+
}
35+
36+
public record Example2(String name) implements IEvent, IEventType.INormalBusEvent {
37+
}
38+
39+
public static void main(String[] args) {
40+
41+
var clz = Object.class;
42+
if (!clz.isInterface()) {
43+
throw new IllegalStateException("oops");
44+
}
45+
46+
47+
BUS.addListener(1, Example.class, e -> {
48+
System.out.println(e.amount());
49+
});
50+
BUS.addListener(1, Example2.class, e -> {
51+
System.out.println(e.name());
52+
});
53+
54+
BUS.post(new Example(100));
55+
BUS.post(new Example2("LOL"));
56+
}
57+
}

src/main/java/org/mangorage/eventbus/interfaces/IEventBus.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,4 @@ public interface IEventBus<F extends IEventType<F>> {
3838

3939
void startup();
4040
void shutdown();
41-
4241
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.mangorage.mangobot.loader.Loader

0 commit comments

Comments
 (0)