Skip to content
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

feat-villager-cap-flag #4357

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ch4ika
Copy link
Contributor

@ch4ika ch4ika commented Feb 23, 2024

Fixes #4269

Description

With this feature we can limit villagers, useful for some servers that only want to control villagers, which is the case in most cbs servers.

@ch4ika ch4ika requested a review from a team as a code owner February 23, 2024 00:37
@github-actions github-actions bot added the Feature This PR proposes a new feature label Feb 23, 2024
return EntityUtil
.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED, MobCapFlag.MOB_CAP_UNLIMITED,
AnimalCapFlag.ANIMAL_CAP_UNLIMITED
);
}

if(EntityCategories.VILLAGER.contains(entityType)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code style

return EntityUtil
.checkEntity(plot, EntityCapFlag.ENTITY_CAP_UNLIMITED, MobCapFlag.MOB_CAP_UNLIMITED,
VillagerCapFlag.VILLAGER_CAP_UNLIMITED
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure we should remove villagers from the animal cap?

} else if (EntityCategories.ANIMAL.contains(entityType) || EntityCategories.VILLAGER.contains(entityType) || EntityCategories.TAMEABLE
} else if (EntityCategories.VILLAGER.contains(entityType)) {
count[CAP_MOB]++;
count[CAP_VILLAGER]++;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here for animal cap

import com.plotsquared.core.plot.flag.types.NonNegativeIntegerFlag;
import org.checkerframework.checker.nullness.qual.NonNull;

public class VillagerCapFlag extends NonNegativeIntegerFlag<VillagerCapFlag> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@since TODO tag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This PR proposes a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entities are not counted correctly on merged plots
2 participants