mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Citizens compatibility. Bug fix for Woodcutting/custom trees.
This commit is contained in:
@ -18,6 +18,11 @@ public class ArcheryManager {
|
||||
public ArcheryManager (Player player) {
|
||||
this.player = player;
|
||||
this.profile = Users.getProfile(player);
|
||||
|
||||
//Compatibility with Citizens, Citizens NPCs won't create a profile so we'll check for it here
|
||||
if(this.profile == null)
|
||||
return;
|
||||
|
||||
this.skillLevel = profile.getSkillLevel(SkillType.ARCHERY);
|
||||
this.permissionsInstance = Permissions.getInstance();
|
||||
}
|
||||
|
@ -385,6 +385,11 @@ public class WoodCutting {
|
||||
}
|
||||
else {
|
||||
TreeSpecies species = TreeSpecies.getByData(block.getData());
|
||||
|
||||
//Apparently species can be null in certain cases (custom server mods?)
|
||||
//https://github.com/mcMMO-Dev/mcMMO/issues/229
|
||||
if(species == null)
|
||||
return;
|
||||
|
||||
switch (species) {
|
||||
case GENERIC:
|
||||
|
Reference in New Issue
Block a user