-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added the "toJSON" method to the "SerializeUtil" interface and used…
… it as a replacement for the entire packet setup. * Added the "isBeingEdited" and "setBeingEdited" methods to the "Shop" interface. This value is now used for the shops during the editing process. * Added the "ShopEditEvent" event which is fired whenever a player opens the edit menu. It is also used by the plugin on the LOWEST priority so it can set the new shop editing value and perform actions. Signed-off-by: XZot1K <[email protected]>
- Loading branch information
Showing
7 changed files
with
91 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
## API-VERSION 1.1.6 ## | ||
## API-VERSION 1.1.7 ## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright (c) 2020 XZot1K, All rights reserved. | ||
*/ | ||
|
||
package xzot1k.plugins.ds.api.events; | ||
|
||
import org.bukkit.entity.Player; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import xzot1k.plugins.ds.api.objects.Shop; | ||
|
||
public class ShopEditEvent extends Event implements Cancellable { | ||
private static final HandlerList handlers = new HandlerList(); | ||
private final Player player; | ||
private final Shop shop; | ||
private boolean cancelled; | ||
|
||
public ShopEditEvent(Player player, Shop shop) { | ||
this.player = player; | ||
this.shop = shop; | ||
} | ||
|
||
// getters & setters | ||
public static HandlerList getHandlerList() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public HandlerList getHandlers() { | ||
return handlers; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancelled) { | ||
this.cancelled = cancelled; | ||
} | ||
|
||
public Player getPlayer() { | ||
return player; | ||
} | ||
|
||
public Shop getShop() { | ||
return shop; | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters