-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed mobs not spawning at player - Player is not begin tick when random ticking - Fixing Duplicated message when sending to all players WIP: player level requirement for summon mobs at target player Known bug: Glowing Effect is not giving to a player
- Loading branch information
Showing
9 changed files
with
148 additions
and
58 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
36 changes: 36 additions & 0 deletions
36
src/main/java/com/pinont/elitebossevent/Listeners/PlayerListener.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.pinont.elitebossevent.Listeners; | ||
|
||
import com.pinont.elitebossevent.EliteBossEvent; | ||
import com.pinont.elitebossevent.Tasks.SummonMobTask; | ||
import com.pinont.elitebossevent.Utils.Message.Reply; | ||
import org.bukkit.Bukkit; | ||
import org.bukkit.event.EventHandler; | ||
import org.bukkit.event.Listener; | ||
import org.bukkit.event.player.PlayerJoinEvent; | ||
import org.bukkit.event.player.PlayerQuitEvent; | ||
|
||
public class PlayerListener implements Listener { | ||
|
||
SummonMobTask summonMobTask = EliteBossEvent.getInstance().summonMobTask; | ||
EliteBossEvent main = EliteBossEvent.getInstance(); | ||
|
||
@EventHandler | ||
public void onPlayerJoin(PlayerJoinEvent event) { | ||
if (Bukkit.getOnlinePlayers().size() == 1) { | ||
new Reply(Reply.SenderType.CONSOLE, "Minimum players reached, Elite event is resuming!"); | ||
main.executeTask(); | ||
} | ||
summonMobTask.updateMaxTickedPlayers(); | ||
} | ||
|
||
@EventHandler | ||
public void onPlayerQuit(PlayerQuitEvent event) { | ||
if (Bukkit.getOnlinePlayers().isEmpty() || main.getConfig().getInt("elite-boss-event.min-players") > Bukkit.getOnlinePlayers().size()) { | ||
new Reply(Reply.SenderType.CONSOLE, "Online players are less than minimum players required, Elite event is pausing!"); | ||
summonMobTask.stop(); | ||
return; | ||
} | ||
summonMobTask.updateMaxTickedPlayers(); | ||
} | ||
|
||
} |
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
Oops, something went wrong.