Comments (12)
I'm also getting this issue with wool teams:
14:01:59 [WARNING] [BattleArena] Task #206 for BattleArena v3.6.8 generated an e
xception
java.lang.NullPointerException
at mc.alk.arena.util.TeamUtil.removeTeamHead(TeamUtil.java:70)
at mc.alk.arena.competition.match.PerformTransition.transition(PerformTr
ansition.java:193)
at mc.alk.arena.competition.match.PerformTransition.transition(PerformTr
ansition.java:71)
at mc.alk.arena.competition.match.PerformTransition.transition(PerformTr
ansition.java:49)
at mc.alk.arena.competition.match.Match$MatchCompleted.run(Match.java:30
7)
at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:52)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(C
raftScheduler.java:321)
at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:509)
at net.minecraft.server.DedicatedServer.q(DedicatedServer.java:213)
at net.minecraft.server.MinecraftServer.p(MinecraftServer.java:473)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:405)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
and after respawning I think its you I'm getting debug from, "Saved?" after respawning, i think.
The NPE may be caused by me not hitting respawn when the match ended?
from battlearena.
I save the armor and inventory at the same time, and only right before they are teleported in (within the same tick). It might be that I need to reupdate their inventory manually before I teleport them. Minecraft sometimes lazily updates players ( for example I had to make a workaround for experience because a player would craft something, and bukkit literally would not update their experience for minutes, so I would store their experience and it would really be wrong because bukkit hadn't updated it).
Here is a thread about that experience issue which i put in a fix for. http://forums.bukkit.org/threads/giving-player-experience-not-updating.81838/
That NPE I'll fix, should be easy.
Thanks for bringing this to me though.. Dupes are the worst sort of bug, and I'll try my best to fix this by tomorrow or the next day.
from battlearena.
So I've been trying to duplicate this dupe and I can't get it to work with or without MultiInv. I follow the same steps but it does nothing for me.
Is this still happening on your main server? If so I'd like to come on and take a look at it.
from battlearena.
I've "fixed" it by making it storeItems on start instead of clear inventory on preReq on the main server. So it's alright for now
from battlearena.
Thats bizarre, behind the scenes the preReqs clearInventory stores items/gamemode/exp when they teleport in.
Here is an example for an arena match. ( you can see these transitions by doing /bad enableDebugging transitions true
02:07:19 [INFO] transition arena1 onStart p= player1 ops=[MatchOptions=[blockBreakOff, teleportIn]] inArena=false
02:07:19 [INFO] transition arena1 onEnter p= player1 ops=[MatchOptions=[storeExperience, storeGamemode, storeItems, clearInventoryOnFirstEnter]] inArena=true
That was a very complicated way of saying I'm confused why your way would work, but the preReqs doesnt.
Happy you found a workaround though!!
Going to put up a most recent version of the code so you can compile, PluginUpdater will be on github too.
from battlearena.
Let me know if this still is happening? Or did the recent BattleArena changes fix this?
from battlearena.
If I run into it again I'll let you know
Still waiting on bukkit to approve your latest version
from battlearena.
Strange, I'm encountering this armour thing again.
How to replicate:
- /bg join - Battleground is in "arena" world. You start in "challenge_7" world
(Battleground begins) - Relog
(Kicked out of battleground, plugin still thinks i'm playing when i /bg join again though )
(Teleported back to challenge_7 world) - You have your armour and wool team head
Replicated with http://pastebin.com/GYrhwLqz as the config.
Maybe related to wool teams?
I'm going to try add clearInventory to onComplete but I don't see that working?
Also question: Does the order matter in your event config? E.g. if I do
onComplete:
options: [ClearInventory, teleportOut]
Will it clear their inventory, and teleport them out after, the opposite order, or a 'random' order?
from battlearena.
Okay, clearInventory added to onComplete fixes players keeping armour but not wool heads.
But restoreItems should handle armour too?
from battlearena.
So restoreItems should handle items, if it's not then thats a bug.
clearInventory when used in onComplete is really a bad name.. it really does 4 things
- clears their inventory
- restores their items
- restores their game mode
- restores their experience
I should really change it to something different, i just didnt want people to have to write 4 things in an option where they will almost always want to do all of them.
The wool heads issue I'm sure is a bug, I will try to fix it as soon as I get back from vacation.
Let me know if you have more questions.. I can also talk via skype or come on teamspeak etc.
from battlearena.
Mmmhmm, thanks for helping even on vacation :P
Can I ask how does restoreItems work? Does it remove any new items the player has acquired since saveItems?
from battlearena.
restoreItems doesn't remove any items. So it's safe to call anywhere.
What it does is give back the players items from whenever saveItems was called.
Once it's used once, it remove the player from a hash, so repeatedly calling restoreItems does nothing.
from battlearena.
Related Issues (20)
- Fight doesn't start automatically HOT 1
- teleportTo & teleportOut causing severe server lag and teleporting players to voids with immortality HOT 3
- teleportTo & teleportOut causing severe server lag and teleporting players to voids with immortality
- Console Spam HOT 2
- Add some things ? :c HOT 6
- Custom Classes Not Working? HOT 4
- Command to add score HOT 1
- BattleArena doesn't install correctly HOT 1
- (Parkour Addon) Custom Parkour Events dont have check/victory points HOT 7
- Failed Loading Plugin HOT 1
- Plugin Load Error HOT 2
- How do you add prices to classes HOT 6
- Cannot choose to join any team besides red or blue HOT 6
- Error occurred while enabling BattleArena v3.9.7.9 HOT 1
- Unable to let an arena allow visitors. HOT 2
- Sending "server_win" message instead of "server_draw" HOT 3
- How edit the Arena's scoreboard
- Auto-Equip Elytra on chestplate slot, & Editing Flight duration of fireworks
- 'There is no class called Archer' HOT 2
- Is this works on 1.15? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from battlearena.