File tree Expand file tree Collapse file tree 4 files changed +7
-6
lines changed
java/to/us/tf/DeathSpectating Expand file tree Collapse file tree 4 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >to.us.tf</groupId >
88 <artifactId >DeathSpectating</artifactId >
9- <version >1.4.2 </version >
9+ <version >1.5 </version >
1010 <properties >
1111 <maven .compiler.source>1.8</maven .compiler.source>
1212 <maven .compiler.target>1.8</maven .compiler.target>
3333 <dependency >
3434 <groupId >com.destroystokyo.paper</groupId >
3535 <artifactId >paper-api</artifactId >
36- <version >1.12 -R0.1-SNAPSHOT</version >
36+ <version >1.13.1 -R0.1-SNAPSHOT</version >
3737 <type >jar</type >
3838 <scope >provided</scope >
3939 </dependency >
Original file line number Diff line number Diff line change 11package to .us .tf .DeathSpectating ;
22
33import org .bukkit .GameMode ;
4+ import org .bukkit .GameRule ;
45import org .bukkit .Location ;
56import org .bukkit .Material ;
67import org .bukkit .Particle ;
2829import to .us .tf .DeathSpectating .listeners .MiscListeners ;
2930import to .us .tf .DeathSpectating .tasks .SpectateTask ;
3031
31- import javax .annotation .Nullable ;
3232import java .util .ArrayList ;
3333import java .util .HashSet ;
3434import java .util .List ;
@@ -159,8 +159,8 @@ public boolean startDeathSpectating(Player player)
159159
160160 try
161161 {
162- boolean keepInventory = Boolean . valueOf ( player .getWorld ().getGameRuleValue ("keepInventory" ) ) || player .getGameMode () == GameMode .SPECTATOR ;
163- boolean showDeathMessages = Boolean . valueOf ( player .getWorld ().getGameRuleValue ("showDeathMessages" ) );
162+ boolean keepInventory = player .getWorld ().getGameRuleValue (GameRule . KEEP_INVENTORY ) || player .getGameMode () == GameMode .SPECTATOR ;
163+ boolean showDeathMessages = player .getWorld ().getGameRuleValue (GameRule . SHOW_DEATH_MESSAGES );
164164
165165 /*Set spectating attributes*/
166166 //Player#isDead() == true when PlayerDeathEvent is fired.
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ void onPlayerBasicallyWouldBeDead(EntityDamageEvent event)
4242
4343 //Ignore if player is holding a totem of undying
4444 PlayerInventory inventory = player .getInventory ();
45- if (inventory .getItemInMainHand ().getType () == Material .TOTEM || inventory .getItemInOffHand ().getType () == Material .TOTEM )
45+ if (inventory .getItemInMainHand ().getType () == Material .TOTEM_OF_UNDYING || inventory .getItemInOffHand ().getType () == Material .TOTEM_OF_UNDYING )
4646 return ;
4747
4848 //Ignore if this is probably the result of the Essentials suicide command
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ version: ${project.version}
44main : to.us.tf.DeathSpectating.DeathSpectating
55website : https://github.com/MLG-Fortress/DeathSpectating/
66softdepend : [Multiverse-Core, MultiWorld]
7+ api-version : 1.13
78permissions :
89 deathspectating.* :
910 description : Grants ALL THE THINGS
You can’t perform that action at this time.
0 commit comments