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

Error EconomyProperty #458

Open
AirLeMineral opened this issue May 29, 2021 · 15 comments
Open

Error EconomyProperty #458

AirLeMineral opened this issue May 29, 2021 · 15 comments

Comments

@AirLeMineral
Copy link

[Server thread/CRITICAL]: Error: "Call to undefined method onebone\economyland\EconomyLand::getInstance()" (EXCEPTION) in "plugins/EconomyProperty/src/onebone/economyproperty/EconomyProperty" at line 239

if you have determined the first position and second position, then use the command /property make (price) (ren time)
error

@onebone
Copy link
Owner

onebone commented May 29, 2021

EconomyProperty requires EconomyLand to be installed. Could you check if it does?

@AirLeMineral
Copy link
Author

AirLeMineral commented May 29, 2021

EconomyProperty requires EconomyLand to be installed. Could you check if it does?

i am trying to use the old version of economyland and it works, because the newest version is not working. i dont know why
but I found a new error
Error: "Call to a member function canBeReplaced() on int" (EXCEPTION) in "plugins/EconomyProperty/src/onebone/economyproperty/EconomyProperty" at line 260

@onebone
Copy link
Owner

onebone commented May 29, 2021

I think my plugin is not working as it is outdated for now. I think I could not make time for fixing this for a while so I ask you to search for an alternative. I will leave this issue until I update the plugin.

@GalonAquaa
Copy link

I think my plugin is not working as it is outdated for now. I think I could not make time for fixing this for a while so I ask you to search for an alternative. I will leave this issue until I update the plugin.

where can I find an alternative? I haven't found it yet :(

@fuyutsuki
Copy link
Contributor

I'm currently working on a PR for this issue, but which plugin should implement these constants?

case EconomyLand::RET_SUCCESS:
EconomyAPI::getInstance()->reduceMoney($player, $info["price"], true, "EconomyProperty");
$player->sendMessage("Successfully bought land.");
$this->property->exec("DELETE FROM Property WHERE landNum = $info[landNum]");
break;
case EconomyLand::RET_LAND_OVERLAP:
$player->sendMessage("[EconomyProperty] Failed to buy the land because the land is trying to overlap.");
return;
case EconomyLand::RET_LAND_LIMIT:
$player->sendMessage("[EconomyProperty] Failed to buy the land due to land limitation.");
return;

@onebone
Copy link
Owner

onebone commented Jul 1, 2021

I'm currently working on a PR for this issue, but which plugin should implement these constants?

case EconomyLand::RET_SUCCESS:
EconomyAPI::getInstance()->reduceMoney($player, $info["price"], true, "EconomyProperty");
$player->sendMessage("Successfully bought land.");
$this->property->exec("DELETE FROM Property WHERE landNum = $info[landNum]");
break;
case EconomyLand::RET_LAND_OVERLAP:
$player->sendMessage("[EconomyProperty] Failed to buy the land because the land is trying to overlap.");
return;
case EconomyLand::RET_LAND_LIMIT:
$player->sendMessage("[EconomyProperty] Failed to buy the land due to land limitation.");
return;

Those constants are the legacy stuffs that had to be existed in the former version of EconomyLand. Please browse here for the actual code. Shamefully, the plugins in this repository are in inconsistent state where some dependencies does not match its required version.
The EconomyLand at 3.x branch is almost at a complete stage except for some missing features such as expiration, and the money transaction feature which is blocked by the work on the api/transaction branch. Although the API of EconomyLand may change as it is still in a development stage, I appreciate a PR using the new Land API.

@fuyutsuki
Copy link
Contributor

I understand that EconomyLand 3.x is almost complete, but it looks like EconomyLand doesn't have an API that returns the equivalent of those old constants.
Therefore, I am not sure whether I should put those constants in EconomyLand temporarily or in EconomyProperty, which has not been updated yet.

@onebone
Copy link
Owner

onebone commented Jul 1, 2021

I understand that EconomyLand 3.x is almost complete, but it looks like EconomyLand doesn't have an API that returns the equivalent of those old constants.
Therefore, I am not sure whether I should put those constants in EconomyLand temporarily or in EconomyProperty, which has not been updated yet.

As a workaround, I think it is best to check if there is an overlapping land region using LandManager::getLandAt() for all 4 anchors of a land. Though it sacrifices performance and yields some database synchronization problems, creating land is not an operation that is frequently requested so I think it is a valid option as a temporary fix.

@onebone onebone closed this as completed in 08e7201 Jul 5, 2021
onebone added a commit that referenced this issue Jul 5, 2021
@fuyutsuki
Copy link
Contributor

fuyutsuki commented Jul 5, 2021

NOTE: there are a couple more errors that need to be fixed to get EconomyProperty working.

@chisi21
Copy link

chisi21 commented Jul 7, 2021

NOTE: there are a couple more errors that need to be fixed to get EconomyProperty working.

Error: "Call to a member function canBeReplaced() on int" (EXCEPTION) in "plugins/EconomyProperty/src/onebone/economyproperty/EconomyProperty" at line 266

PMMP VER : 3.21.0
PHP: 7.4

@onebone
Copy link
Owner

onebone commented Jul 7, 2021

Oops I confused this issue with the PR. Reopening it.

@onebone onebone reopened this Jul 7, 2021
@fuyutsuki
Copy link
Contributor

Additional PRs will be submitted.

@AirLeMineral
Copy link
Author

PR tambahan akan dikirimkan.

I will wait for it :D

@KygekDev
Copy link

PR tambahan akan dikirimkan.

I will wait for it :D

LOL, looks like he used Google Translate to translate this page to Indonesian.

@AirLeMineral
Copy link
Author

PR tambahan akan dikirimkan.

I will wait for it :D

LOL, looks like he used Google Translate to translate this page to Indonesian.

Sry, automatic 😁

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

No branches or pull requests

6 participants