Skip to content

Commit

Permalink
Version 1.0.2: added InteractObservable
Browse files Browse the repository at this point in the history
  • Loading branch information
toonsevrin committed Oct 7, 2016
1 parent fde9e1c commit f8fd06c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>com.exorath</groupId>
<artifactId>ExoCommons</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>

<repositories>
<repository>
Expand Down
35 changes: 35 additions & 0 deletions src/main/java/com/exorath/commons/InteractObservable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright 2016 Exorath
*
* 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.exorath.commons;

import io.reactivex.Observable;
import org.bukkit.event.player.PlayerInteractEvent;

/**
* An interface that can be applied to a clickable subject, this interface will emit an event whenever the subject is clicked.
* Created by toonsev on 10/7/2016.
*/
public interface InteractObservable {

/**
* Returns a hot observable that emits an event whenever the subject is interacted with by a player.
* This observable may complete when the subject dies/despawns.
*
* @return a hot observable that emits an event whenever the subject is interacted with by a player
*/
Observable<PlayerInteractEvent> getObservableInteraction();
}
1 change: 1 addition & 0 deletions src/main/java/com/exorath/commons/LocationObservable.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.bukkit.Location;

/**
* An interface that can be applied to a moveable subject, this interface will emit an event whenever the subject moves.
* Created by toonsev on 10/6/2016.
*/
public interface LocationObservable {
Expand Down

0 comments on commit f8fd06c

Please sign in to comment.