Skip to content

Commit

Permalink
Improved GenericTrigger.trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
caoli5288 committed Nov 21, 2019
1 parent 7d3faff commit cc1de13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<repositories>
<repository>
<id>bukkit-ci</id>
<url>http://ci.mengcraft.com:8081/plugin/repository/everything/</url>
<id>i7mc_repository</id>
<url>http://repository.i7mc.com:8008/</url>
</repository>
</repositories>

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/mengcraft/simpleorm/GenericTrigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public TriggerListener on(@NonNull String category, @NonNull IProcessor processo
return listener;
}

public Map<String, Object> trigger(@NonNull String category, @NonNull String key, @NonNull Object value) {
return trigger(category, ImmutableMap.of(key, value));
}

public Map<String, Object> trigger(@NonNull String category, @NonNull ImmutableMap<String, Object> params) {
Map<String, Object> object = new HashMap<>();
for (TriggerListener listener : functions.get(category)) {
Expand Down

0 comments on commit cc1de13

Please sign in to comment.