質問編集履歴

4

エラー内容追加

2020/01/25 13:50

投稿

AI_nine
AI_nine

スコア4

test CHANGED
File without changes
test CHANGED
@@ -20,6 +20,8 @@
20
20
 
21
21
  ![DCCoreライブラリのUtilクラスを利用できない](79c7e30b1a3f1df53653b166f907fa55.png)
22
22
 
23
+ ![エラー文](0970bfd475d6df6e72e2b6f1885e89b2.png)
24
+
23
25
 
24
26
 
25
27
 

3

画像修正

2020/01/25 13:49

投稿

AI_nine
AI_nine

スコア4

test CHANGED
File without changes
test CHANGED
@@ -16,188 +16,186 @@
16
16
 
17
17
  解決方法を提案してくださるとありがたいです。
18
18
 
19
+
20
+
21
+ ![DCCoreライブラリのUtilクラスを利用できない](79c7e30b1a3f1df53653b166f907fa55.png)
22
+
23
+
24
+
25
+
26
+
27
+ ### 該当のソースコード
28
+
29
+
30
+
31
+ ```buildgradle
32
+
33
+ buildscript {
34
+
35
+ ext {
36
+
37
+ junit_version = '4.12'
38
+
39
+ kotlin_version = '1.3.61'
40
+
41
+ spigot_version = '1.14.4-R0.1-SNAPSHOT'
42
+
43
+ }
44
+
45
+ repositories {
46
+
47
+ mavenCentral()
48
+
49
+ }
50
+
51
+ dependencies {
52
+
53
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
54
+
55
+ }
56
+
57
+ }
58
+
59
+
60
+
61
+ apply plugin: 'java'
62
+
63
+ apply plugin: 'kotlin'
64
+
65
+ apply plugin: 'idea'
66
+
67
+
68
+
69
+ group = pluginGroup
70
+
71
+ version = pluginVersion
72
+
73
+
74
+
75
+ sourceCompatibility = 1.8
76
+
77
+ targetCompatibility = 1.8
78
+
79
+
80
+
81
+ repositories {
82
+
83
+ mavenCentral()
84
+
85
+ maven {
86
+
87
+ name = 'spigotmc-repo'
88
+
89
+ url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
90
+
91
+ }
92
+
93
+ maven {
94
+
95
+ name = 'sonatype'
96
+
97
+ url = 'https://oss.sonatype.org/content/groups/public/'
98
+
99
+ }
100
+
101
+ maven {
102
+
103
+ url = 'https://raw.github.com/DarkCrypt/DCCore/master/project/repository'
104
+
105
+ }
106
+
107
+ }
108
+
109
+
110
+
111
+ dependencies {
112
+
113
+ testImplementation group: 'junit', name: 'junit', version: junit_version
114
+
115
+ testRuntimeOnly group: 'junit', name: 'junit', version: junit_version
116
+
117
+ compile "org.spigotmc:spigot-api:$spigot_version"
118
+
119
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
120
+
121
+ compile fileTree(dir: 'libs', include: '*.jar')
122
+
123
+ }
124
+
125
+
126
+
127
+ import org.apache.tools.ant.filters.ReplaceTokens
128
+
129
+
130
+
131
+ processResources {
132
+
133
+ from(sourceSets.main.resources.srcDirs) {
134
+
135
+ filter ReplaceTokens, tokens: [version: version]
136
+
137
+ }
138
+
139
+ }
140
+
19
141
  ```
20
142
 
143
+ ```PlayerListener
144
+
145
+ package com.github.ainine9.kotlintest.listener
146
+
147
+
148
+
149
+ import org.bukkit.event.EventHandler
150
+
151
+ import org.bukkit.event.Listener
152
+
153
+ import org.bukkit.event.player.PlayerJoinEvent
154
+
155
+ import com.github.ainine9.dccore.Util
156
+
157
+
158
+
159
+ class PlayerListener : Listener {
160
+
161
+
162
+
21
- エラーメッセージ
163
+ @EventHandler
164
+
22
-
165
+ fun PlayerJoin(event : PlayerJoinEvent) {
166
+
23
- [DCCoreが認識されていない](https://i.gyazo.com/d4609829a7417f7bd0e29fab820cc795.png)
167
+ Util.getPlayers().sendMessage("hello")
168
+
169
+ }
170
+
171
+ }
24
172
 
25
173
  ```
26
174
 
27
-
28
-
29
- ### 該当のソースコード
30
-
31
-
32
-
33
- ```buildgradle
175
+ ```Util
176
+
34
-
177
+ package com.github.ainine9.dccore
178
+
179
+
180
+
181
+ import org.bukkit.Bukkit
182
+
183
+ import org.bukkit.entity.Player
184
+
185
+
186
+
35
- buildscript {
187
+ open class Util {
36
-
188
+
37
- ext {
189
+ companion object {
190
+
38
-
191
+ fun getPlayers() : Player {
192
+
39
- junit_version = '4.12'
193
+ return Bukkit.getOnlinePlayers().first()
40
-
41
- kotlin_version = '1.3.61'
194
+
42
-
43
- spigot_version = '1.14.4-R0.1-SNAPSHOT'
44
-
45
- }
195
+ }
46
-
47
- repositories {
48
-
49
- mavenCentral()
50
-
51
- }
52
-
53
- dependencies {
54
-
55
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21"
56
-
57
- }
58
-
59
- }
60
-
61
-
62
-
63
- apply plugin: 'java'
64
-
65
- apply plugin: 'kotlin'
66
-
67
- apply plugin: 'idea'
68
-
69
-
70
-
71
- group = pluginGroup
72
-
73
- version = pluginVersion
74
-
75
-
76
-
77
- sourceCompatibility = 1.8
78
-
79
- targetCompatibility = 1.8
80
-
81
-
82
-
83
- repositories {
84
-
85
- mavenCentral()
86
-
87
- maven {
88
-
89
- name = 'spigotmc-repo'
90
-
91
- url = 'https://hub.spigotmc.org/nexus/content/groups/public/'
92
-
93
- }
94
-
95
- maven {
96
-
97
- name = 'sonatype'
98
-
99
- url = 'https://oss.sonatype.org/content/groups/public/'
100
-
101
- }
102
-
103
- maven {
104
-
105
- url = 'https://raw.github.com/DarkCrypt/DCCore/master/project/repository'
106
-
107
- }
108
-
109
- }
110
-
111
-
112
-
113
- dependencies {
114
-
115
- testImplementation group: 'junit', name: 'junit', version: junit_version
116
-
117
- testRuntimeOnly group: 'junit', name: 'junit', version: junit_version
118
-
119
- compile "org.spigotmc:spigot-api:$spigot_version"
120
-
121
- compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
122
-
123
- compile fileTree(dir: 'libs', include: '*.jar')
124
-
125
- }
126
-
127
-
128
-
129
- import org.apache.tools.ant.filters.ReplaceTokens
130
-
131
-
132
-
133
- processResources {
134
-
135
- from(sourceSets.main.resources.srcDirs) {
136
-
137
- filter ReplaceTokens, tokens: [version: version]
138
196
 
139
197
  }
140
198
 
141
199
  }
142
200
 
143
201
  ```
144
-
145
- ```PlayerListener
146
-
147
- package com.github.ainine9.kotlintest.listener
148
-
149
-
150
-
151
- import org.bukkit.event.EventHandler
152
-
153
- import org.bukkit.event.Listener
154
-
155
- import org.bukkit.event.player.PlayerJoinEvent
156
-
157
- import com.github.ainine9.dccore.Util
158
-
159
-
160
-
161
- class PlayerListener : Listener {
162
-
163
-
164
-
165
- @EventHandler
166
-
167
- fun PlayerJoin(event : PlayerJoinEvent) {
168
-
169
- Util.getPlayers().sendMessage("hello")
170
-
171
- }
172
-
173
- }
174
-
175
- ```
176
-
177
- ```Util
178
-
179
- package com.github.ainine9.dccore
180
-
181
-
182
-
183
- import org.bukkit.Bukkit
184
-
185
- import org.bukkit.entity.Player
186
-
187
-
188
-
189
- open class Util {
190
-
191
- companion object {
192
-
193
- fun getPlayers() : Player {
194
-
195
- return Bukkit.getOnlinePlayers().first()
196
-
197
- }
198
-
199
- }
200
-
201
- }
202
-
203
- ```

2

画像が出ないのでリンクに変更

2020/01/25 13:48

投稿

AI_nine
AI_nine

スコア4

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  エラーメッセージ
22
22
 
23
- ![DCCoreが認識されていない](https://i.gyazo.com/d4609829a7417f7bd0e29fab820cc795.png)
23
+ [DCCoreが認識されていない](https://i.gyazo.com/d4609829a7417f7bd0e29fab820cc795.png)
24
24
 
25
25
  ```
26
26
 

1

画像が表示されていなかったのを修正

2020/01/25 13:47

投稿

AI_nine
AI_nine

スコア4

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  エラーメッセージ
22
22
 
23
- ![DCCoreプラグインが認識されていない](8a74314f4aa12eeda79442a36d4318b9.png)
23
+ ![DCCoreが認識されていない](https://i.gyazo.com/d4609829a7417f7bd0e29fab820cc795.png)
24
24
 
25
25
  ```
26
26