-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
867c8c1
commit ec51b36
Showing
7 changed files
with
67 additions
and
20 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
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
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
28 changes: 26 additions & 2 deletions
28
Forge/src/main/java/com/blamejared/clumps/api/events/ValueEvent.java
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,26 +1,50 @@ | ||
package com.blamejared.clumps.api.events; | ||
|
||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraftforge.eventbus.api.Event; | ||
|
||
public class ValueEvent extends Event implements IValueEvent { | ||
|
||
private final Player player; | ||
private int value; | ||
|
||
public ValueEvent(int value) { | ||
public ValueEvent(Player player, int value) { | ||
|
||
this.player = player; | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* Sets the value of the experience orb. | ||
* | ||
* @param value The new value to set. | ||
*/ | ||
@Override | ||
public void setValue(int value) { | ||
|
||
this.value = value; | ||
} | ||
|
||
/** | ||
* Gets the value of the experience orb. | ||
* | ||
* @return The value of the experience orb. | ||
*/ | ||
@Override | ||
public int getValue() { | ||
|
||
return value; | ||
return this.value; | ||
} | ||
|
||
/** | ||
* Gets the player that the experience is being given to. | ||
* | ||
* @return The player the experience is being given to. | ||
*/ | ||
@Override | ||
public Player getPlayer() { | ||
|
||
return this.player; | ||
} | ||
|
||
} |
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