Skip to content

Commit

Permalink
Merge pull request #33 from ClubObsidian/3.0.0
Browse files Browse the repository at this point in the history
3.0.0
  • Loading branch information
virustotalop authored Apr 2, 2021
2 parents 033c78a + b2e2b74 commit ae723df
Show file tree
Hide file tree
Showing 46 changed files with 1,954 additions and 1,881 deletions.
2 changes: 1 addition & 1 deletion LICENSE_HEADER
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2019 Club Obsidian and contributors.
Copyright 2021 Club Obsidian and contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Known Vulnerabilities](https://snyk.io//test/github/ClubObsidian/trident/badge.svg?targetFile=build.gradle)](https://snyk.io//test/github/ClubObsidian/trident?targetFile=build.gradle)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Discord](https://img.shields.io/discord/482823104905609248.svg?logo=discord)](https://discord.gg/EY5Tq6r)
[![javadocs](https://img.shields.io/badge/Javadocs-2.1.0-success.svg)](https://jitpack.io/com/github/clubobsidian/trident/2.1.0/javadoc/)
[![javadocs](https://img.shields.io/badge/Javadocs-3.0.0-success.svg)](https://jitpack.io/com/github/clubobsidian/trident/3.0.0/javadoc/)

A dead simpile annotation-based event bus that allows different event executor implementations.

Expand All @@ -33,7 +33,7 @@ repositories {
maven { url 'https://jitpack.io' }
}
compile 'com.github.clubobsidian:trident:2.1.0'
compile 'com.github.clubobsidian:trident:3.0.0'
```

### Maven
Expand All @@ -49,7 +49,7 @@ compile 'com.github.clubobsidian:trident:2.1.0'
<dependency>
<groupId>com.github.clubobsidian</groupId>
<artifactId>trident</artifactId>
<version>2.1.0</version>
<version>3.0.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

group = 'com.clubobsidian'
version = '2.0.0'
version = '3.0.0'

repositories {
mavenCentral()
Expand Down
37 changes: 0 additions & 37 deletions src/main/java/com/clubobsidian/trident/Cancelable.java

This file was deleted.

38 changes: 38 additions & 0 deletions src/main/java/com/clubobsidian/trident/Cancellable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright 2021 Club Obsidian and contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.clubobsidian.trident;

/**
* Interface to implement Cancelable.
* Events should implement this interface
* if the event should be able to be cancelled.
*
* @author virustotalop
*/
public interface Cancellable {

/**
* Returns if the event is cancelled.
*
* @return if the event is cancelled
*/
boolean isCancelled();

/**
* Set whether or not for an event to be cancelled.
*/
void setCancelled(boolean cancel);
}
52 changes: 26 additions & 26 deletions src/main/java/com/clubobsidian/trident/Event.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
/*
Copyright 2019 Club Obsidian and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
* Copyright 2021 Club Obsidian and contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.clubobsidian.trident;

/**
* Superclass of all events. Events should
* extend this class.
*
*
* @author virustotalop
*/
public abstract class Event {
/**
* Uses reflection getClass().getSimpleName() to return
* the name of the event class.
* @return name of the event
*/
public String getName()
{
return this.getClass().getSimpleName();
}

/**
* Uses reflection getClass().getSimpleName() to return
* the name of the event class.
*
* @return name of the event
*/
public String getName() {
return this.getClass().getSimpleName();
}
}
Loading

0 comments on commit ae723df

Please sign in to comment.