-
Notifications
You must be signed in to change notification settings - Fork 11
Civ14 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Civ14 #18
Conversation
Added ToggleLamp
Removed debug messages
ProgrammerDan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly leaving comments for myself.
Final bit is for config.yml -- new contributions don't have a default
src/main/java/com/programmerdan/minecraft/simpleadminhacks/configs/TimingsHackConfig.java
Show resolved
Hide resolved
| plugin().log(yml.saveToString()); | ||
| sender.sendMessage(yml.saveToString()); | ||
| } | ||
| YamlConfiguration yml = new YamlConfiguration(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing a valid null check? huh?
| } else { | ||
| sb.append(" (none)"); | ||
| } | ||
| sb.append(String.format(" %16s", player.getName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, removing null checks that were added due to observed defects...
It's possible the spigot / bukkit has improved but generally these checks are defensive to prevent NPE propogation in the case that a spigot implementation is flawed, or in this case -- an event is fired and the underlying data model is out of sync, and partially "invalid" per contract. Best to keep them in...
| sb.append(String.format(", %16s v %16s", | ||
| event.getDamager() != null ? event.getDamager().getName() : "--unknown--", | ||
| event.getEntity() != null ? event.getEntity().getName() : "--unknown--" )); | ||
| sb.append(String.format(", %16s v %16s", event.getDamager().getName(), event.getEntity().getName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More removed, worthwhile nullchecks.
| Bukkit.getServer().getPluginManager().callEvent(pbee); | ||
| if (pbee.isCancelled()) { | ||
| return; | ||
| if (e.getBedEnterResult() == BedEnterResult.NOT_POSSIBLE_NOW || e.getBedEnterResult() == BedEnterResult.NOT_SAFE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self to test, great news if they are firing the normal event now
|
|
||
| public void adminCloseInventory(InventoryCloseEvent event) { | ||
| if (event.getPlayer() != null && this.adminsWithInv.contains(event.getPlayer().getUniqueId())) { | ||
| if (this.adminsWithInv.contains(event.getPlayer().getUniqueId())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to leave this null check off, but I suspect it was there with a reason too, just nothing as specific coming to mind as with the others.
…t some were hard earned. I do hope that Spigot is more faithful and careful in these later releases, but better to check and be sure then not check and be unsure. Some I did not add back in. Any I added back in I wrote why I added it. I also switched around some orderings to use equals() checks, and also addressed some changes to map views in new releases, although there is more to do there. As well, expanded certain block lists and biome lists even further, lots of new content in these new minecraft releases. Probably first of several commits, as I test.
… a new dragon damage for servers that want to allow dragon spawning but would prefer they dont remove the world en mass. Untested at yet. Some other fixes as noted in my self-review.
and removed duplicated enderchest check
Fixed issue where onPlayerInteract() would re-enable cancelled event and removed duplicated enderchest check
Added options for disabling Phantoms, Bad Omen and Patrols
Added Phantom Management
Add null check
for evaluation and fixes before merge