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

Change enum names to conform to java conventions #17

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

Conversation

liorsl
Copy link

@liorsl liorsl commented Jan 14, 2023

No description provided.

@@ -6,7 +6,7 @@
import dev.watchwolf.entities.items.Item;

public enum EntityType {
DroppedItem;
DROPPED_ITEM;
Copy link
Owner

Choose a reason for hiding this comment

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

Check on line 18 I'll get the enum using the class name. You'll have to change the getType function to convert the enum name to UpperCamelCase.

@@ -1,6 +1,6 @@
package dev.watchwolf.entities;

public enum ServerType {
Copy link
Owner

Choose a reason for hiding this comment

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

In dev.watchwolf.tester.TestConfigFileLoader, line 62 you read the server type specified in the config file and convert it into ServerType type. You'll have to change that valueOf to accept UpperCammelCase inputs.

@@ -1,6 +1,6 @@
package dev.watchwolf.entities;

public enum ServerType {
Copy link
Owner

Choose a reason for hiding this comment

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

By definition in the WatchWolf Standard, the server type is UpperCammelCase (ref, in subsection 2.4.7 Server type, under page 18). When you send the 'start server operation' to WatchWolf ServersManager (dev.watchwolf.tester.TesterConnector, line 237) you'll have to convert mcType.name() to UpperCammelCase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants